on 08-05-2008 7:27 PM
I have created a report in Crystal Report XI
I have an application (VB6) which captures values and I would like to pass these parameters to this report in oder to determine the selection process
i.e.
I want to pass an "order number" to this report in order for the report to select data based on this input.
VB code is as follows
Function CReport_DC(ml_no As Integer, ls_no As Integer)
Dim CrApps As CRAXDRT.Application
Dim CrRep As CRAXDRT.Report
Set CrApps = New CRAXDRT.Application
Set CrRep = CrApps.OpenReport("C:\MyReports\CC.rpt")
CrRep.DiscardSavedData
CrRep.ParameterFields.GetItemByName("Master_Load_No").AddCurrentValue ml_no
'CrRep.ParameterFields.GetItemByName("Load_Stop_No").AddCurrentValue ls_no
Screen.MousePointer = vbHourglass
CRViewer.ReportSource = CrRep
CRViewer.ViewReport
Screen.MousePointer = vbDefault
Set CrRep = Nothing
Set CrApps = Nothing
End Function
I receive the following error
error -2147189582 Invalid Name
I obviously need to link my parm "ml_no" and "ls_no" to valids name within the report but I do not know how?
Can someone please please help?
This should be straight forward. You need to open the report in the Crystal designer and look at the parameters in your Field Explorer. The parameter name you reference in code needs to match what you find in your report design.
Have you confirmed this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
An obvious assumption, but one that needs to be confirmed;
1) "Master_Load_No" and "Load_Stop_No" are Parameter Fields that do exist in the report?
2) When you run the report in the CR designer, you are able to pass in the values "ml_no" and "ls_no" successfully?
And couple of questions;
1) What CR SP are you on?
2) This is happening on your dev computer?
Ludek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yup, have a look here:
BTW., what was the solution?
Ludek
If you want help with the features inside the Crystal Reports designer you can simply press F1 when working with the Crystal Reports designer. This will bring up the help guide.
Or, you can check out [here|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm] for developer info.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.