cancel
Showing results for 
Search instead for 
Did you mean: 

Referencing shared variables in previous sub-section of Crystal Reports

Former Member
0 Kudos

Hi,

I have a report where I need to print the consolidated data of actual & expected production in Report Footer 'a' sub-section from 3 hub's that is procured from different data sources and printed within respective Subreport in Report Footer 'b','c' & 'd' sub-section. I am making the use of shared variables. However, the shared variables' output in Report Footer 'a' shows 0.00 although the same shared variables populate values from subsequent sub-sections. Thus, I find that values within shared variables can not be referenced within previous sub-section.

Kindly let me know if there is a workaround to sequence the printing of records in such a manner that values in Report Footer 'a' is printed after the values in the Report Footer 'b','c' & 'd' sub-sections have been processed.

Regards,

Ray

Accepted Solutions (0)

Answers (2)

Answers (2)

abhilash_kumar
Active Contributor
0 Kudos

Hi Ray,

Unfortunately, that's how shared variables work!

You cannot 'read' a shared variable's value coming from the Subreport in the same section or in a section above the section that holds that Subreport.

You'll only be able to access the value in a section below the section that holds the Subreport.

Only workaround is to somehow place the Subreport 'above' Report Footer 'a'.

-Abhilash

former_member203899
Active Participant
0 Kudos

Hi,

I am not sured about that but i will suggest you to use Global Shared varialbles for that.

It will used in all our the report.

Regards,

Nishit Makadia