Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shared Variable from One Subreport to Other Subreport

Status
Not open for further replies.

Cores

Programmer
Oct 17, 2007
92
CA
Crystal Reports for Enterprise
Hi Experts,

In order to display percentage previous records in group footer of main report, I placed a sub-report in the group header of main report. The sub-report calculates running totals that are placed into shared variables. The main report retrieves the values (last and current year values) of the shared variables correctly.

My question how to share variables from sub-report to another sub-report? The same percentage formula displays zeros.
Please help!!!
 
Are the sub-reports in different sections? Shared values from a sub-report are not available until the next section of a report.
 
Hi kray,

yes, the first sub-report that declared shared variables is in the group header of main report and the second sub is in report footer of the main report.
I can see that the second sub-report displays only the last group value from first sub-report. The second sub contains the following formula:
if lastyear <> 0 then
(currentyear - lastyear) % lastyear
ELSE 0​
As result, zeros are displayed in second sub-report. What to do to display all values?
thanks kray for reply
 
If the second sub is in the report footer, then it should have the values from the last group header sub-report. It makes processing sense.

So are you saying that you somehow want to process all values from each group? If so, a different approach will be needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top