SAP Knowledge Base Article - Public

2030573 - Shared Variables in OnDemand subreport

Symptom

Shared variables values are missing in OnDemand subreport 

Environment

  • Crystal Reports 2008
  • SAP Crystal Reports 2011

Reproducing the Issue

  1. Create report with an OnDemand subreport
  2. Create a shared variable formula in the main report and assign a value to the variable
  3. Create the same shared variable formula in the subreport to display the value
  4. Refresh the report and observe the value in the subreport. It could be missing. 

Cause

Shared variables are not intended to work with OnDemand subreports.

Values could not be shared from the OnDemand subreport to the main report until the subreport got executed.

So the only direction values could be passed is from the main report to the subreport, but why to use shared variables if subreport link can do it more effective.

 

Resolution

Use Subreport links to pass values from the main report to a subreport

Keywords

WhilePrintingRecords, empty, blank, , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , BI-RA-CRE , Crystal Reports for Enterprise , How To

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2011, feature pack 03