I am trying to do something very similar, using CR8.0, to what arachnoid was doing. My main report summarizes dental claims for all groups in a given month by group type (HIPPA, Large Group, & SEHI). For each group, the report must show the total number of group employees that are eligible for dental benefits - this is the subreport. I am attempting to suppress group summary lines where the group has no (zero) eligible employees, by using a shared variable to pass the number back to the main report from the subreport. Unfortunately, every summary line (group) in the main report has the shared variable value of the previous group, therefore, the wrong group gets suppressed.
The main report displays only the summary line at Group Footer #2 (GroupID) since the data is exported to Excel for further manipulation (this is where the subreport is located and the shared value is reset). Group #1 (GroupType) is not displayed, but used to insure that all the groups of a particular type, remain together.
The subreport receives the GroupID and the RptMonth from the main report as parameters and displays the distinct count of all eligible employees for that group, in that month. The employee count is displayed in the Report Footer, although it is the same as the total from GF#1 (GroupID). GF#1 is where the shared value is set from the distinct count.
Can you tell me why my shared value is being passed to the wrong group? What am I not understanding correctly about shared variables?
Thank you for your help,
Jamie Morrison
Health Plan Data Analyst
(Report Developer)
Clear Choice Health Plans