Skip to Content
Former Member
Nov 17, 2008 at 04:51 AM

Subreport Export Problem - Help !


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 ...