Print Page | Close Window

Shared Variables

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21099
Printed Date: 04 May 2024 at 1:10pm


Topic: Shared Variables
Posted By: MNEMS
Subject: Shared Variables
Date Posted: 07 Oct 2014 at 6:58am
Hello all,
Hopefully someone can help me with a quick question.

I am attempting to compare data within each month from the previous year to the current year. For the previous year, I created a subreport with parameters for just the previous year data. I created a shared variable that calculates an average for each month.

I'm now wanting to pass each months average back to the main report to compare the previous years month to current years month. Each time I adjust the shared variable I keep getting what appears to be the last calculated average from the subreport into each group in the main report.

Is there anyway to pass the average within each group from the subreport to the main report's group. I made sure to calculate the previous years data prior to the main reports.

Thanks all



Replies:
Posted By: kevlray
Date Posted: 07 Oct 2014 at 8:23am
I do not know the structure of your report.  But be reminded that the correct value from a sub report will appear in any section after the sub-report.  If  you attempt to retrieve the value of a shared variable from a sub-report in the same or previous section as the sub-report is in, you could get questionable results.



Print Page | Close Window