473,480 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to Pass Multi Parameter to Crystal Report

Kosal
68 New Member
Dear Sir/Madam

I would like you to help give me the an example pass multi parameter to crystal report.

thanks
Best Regard
Kosal
Nov 2 '08 #1
1 2481
Dököll
2,364 Recognized Expert Top Contributor
Hey there Partner!

This may be what you need:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim oCrystalApp As CRAXDRT.application
  3.  
  4. Dim oCrystalReport As CRAXDRT.Report
  5.  
  6. Dim oCrystalParameters As CRAXDRT.ParameterFieldDefinitions
  7.  
  8. Dim oCrystalParameter As CRAXDRT.ParameterFieldDefinition
  9.  
  10.  
  11.  
  12. ' Open the report
  13.  
  14. Public Sub OpenReport(cReportName as string)
  15.  
  16. Set oCrystalReport = oCrystalApp.OpenReport(cReportName, crOpenReportByTempCopy)
  17.  
  18. Set oCrystalParameters = oCrystalReport.ParameterFields
  19.  
  20. End Sub
  21.  
  22.  
  23.  
  24. 'Set Parameters
  25.  
  26. Public Sub SetParameter(cParmName as string, cParmValue as string)
  27.  
  28. For Each oCrystalParameter In oCrystalParameters
  29.  
  30.     If oCrystalParameter.Name = cParmName  Then
  31.  
  32.         Select Case oCrystalParameter.ValueType
  33.  
  34.             Case crDateField, crDateTimeField, crDateField
  35.  
  36.                 oCrystalParameter.SetCurrentValue CDate(cParmValue)
  37.  
  38.             Case crNumberField
  39.  
  40.                 oCrystalParameter.SetCurrentValue Val(cParmValue)
  41.  
  42.             Case Else
  43.  
  44.                 oCrystalParameter.SetCurrentValue cParmValue & ""
  45.  
  46.         End Select
  47.  
  48.     End If
  49.  
  50. Next oCrystalParameter
  51.  
  52. End Sub
  53.  
Have a look here if not helpful:
http://www.google.com/search?hl=en&r...b6&btnG=Search

Let us know if anything worked...
Nov 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1798
by: Michael | last post by:
I followed the solution document at the http://support.businessobjects.com/library/kbase/articles/c2015079.asp?ref=devzone_netzone_howto .. However, the Crystal Report prompt is still showing. The...
0
1614
by: Brenny | last post by:
Hi I'm developing a project and in the project, I used crystal report. Firstly my database isn't protected with password. After finishing project I determined a password for my database. Firstly...
6
3557
by: Woody Splawn | last post by:
I am using SQL Server 2000 as a back-end to a VS.net Client/Server app. In a certain report I use a view as part of the query spec. For the view, at present, I am querying for all the records in...
2
2195
by: Raj | last post by:
How to pass a Two Date parameter to a report at runtime using VB .NET -- Raj Kumar Mishra jcast Networks Ltd. New Delhi. India. 91-51678212,13,14
1
1667
by: Ray | last post by:
Hi all, I would like to ask how to pass a parameter from vb.net to Crystal Report. So I can select a record from SQL database in the Crystal Report. Thanks a lot, Ray
1
2224
by: Ray | last post by:
Dear all, How to pass parameter from vb.net to Crystal Report? I'm now using ReportDocument and CrystalReportViewer. However, I don't know how to pass a parameter to the report and print the...
4
2227
by: Marcelo | last post by:
Any suggestion? Thanks Marcelo
0
1793
by: lrobo01 | last post by:
I'm having a problem with Crystal report.net with ASP.NET. The problem occurs when exporting the report. The report uses a discrete parameter with multiple values. When the report is loaded into...
0
2079
by: PriyaManasarovar | last post by:
Can someone help how to pass parameters to a crystal report using a Crystal report object? I am using a console application & hence crystal report viewer cannot be used. And i need to pass the...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7043
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7081
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6737
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5336
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4776
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.