I need assistance on how to create a shared variable in a subreport by group that can be used in the main report for each corresponding group. any ideas?
You simply declare and use the same shared variable in the subreport and in the main report.
The main issue is that to use the value from the subreport, the formula referencing the variable in the main report must be placed in a section BELOW the section where the subreport is.
Cheers,
- Ido
CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
In the Details or the Group Footer you can now reference the value using something like
whileprintingrecords;
shared numbervar SubNum;
If Subnum <> 0 then
Table.value} / Subnum
else
0
You can run the subreport at any level, but if you're doing so by groups, reset the value before the subreport fires, and use it afterwards.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.