cancel
Showing results for 
Search instead for 
Did you mean: 

Subreport Export Problem - Help !

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Here are my results:

1. The subreport can be exported from Designer.

2. After installing CR8.5 SP3, i have an error when viewing the report. The error is

"Method 'ReportSource' of object 'ICrystalReportViewer5' failed"

Any solution please ! ...

Regards

former_member183750
Active Contributor
0 Kudos

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

Former Member
0 Kudos

I am sorry i did not fully explain the error.

The error comes when the application viewing the report not when exporting the report.

Ok, i will try to create new app and later back to you with the result.

Regards

Answers (0)