on 11-17-2008 4:51 AM
I've developed a report viewer application using Visual Basic 6 and Crystal Report 8.5.
The application has a problem when using report with sub reports. The application always export a blank report (no data) although i have set a parameter value programmatically.
Here is the code to export sub report :
Set crSubReport = crMainReport.OpenSubreport("Test")
Set crSubReportParamDef = crSubReport.ParameterFields("InsertLocation")
crSubReportParamDef.AddCurrentValue "ALL"
crSubReport.EnableParameterPrompting = False
crSubReport.Export True
If i check IsCurrentValueSet property value after AddCurrentValue, the value is always False.
Is my code have a problem ?
The sub report successfully exporting the report, when i use parameter prompting features.
Please help ...
Regards
The code looks good. Two things to try:
1) Does the export work from the designer?
2) Look for the latest CR updates for CR 8.5 here:
https://www.sdn.sap.com/irj/sdn/businessobjects-downloads
If (1) is yes and you get no joy with the updates in (2), consider upgrading to CR XI r2 (the last version to ship the RDC). CR 8.5 is out of support so I don't even have it installed to test it - not that we'd get a fix through anyhow - not for the RDC...
Ludek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think I'm getting the full story here. I can not level this:
crSubReport.Export True
with this;
"Method 'ReportSource' of object 'ICrystalReportViewer5' failed"
How can you get the viewer failing on an export call?
Not knowing how the two above relate, I'm not sure what to recommend...
Try to create a new app and see if you get the viewer error? Or if it will let you export?
Also, I do not think you sent the full export code? E.g.; report.export true. How do you set the format and destination?
Ludek
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.