Skip to Content
0
Former Member
Jan 04, 2011 at 04:12 PM

Shared variable value showing as 0 if last page in CR2008

39 Views

I have a main report with 2 levels of grouping. In group footer2a I have two linked subreports. Each of them sets a different shared variable and have whileprintingrecods specified in the formula that sets the shared variable. The detail in each of the subreports is optionally suppressed based on a parameter (i.e. detail or summary) that is passed to the subreport but is not used in selection criteria. I have a groupfooter2b section which has formulas to show the shared variable values. These also have Whileprintingrecords specified. These shared variables are reset to zero using a formula that is in group footer 2c, which is a suppressed section.Group footer2a is not suppressed. For some reason if I run the report showing detail the shared variable from the 2nd subreport displays as zero in group footer2b for the last group (i.e on last page) even though I can clearly see that I have data from it. The report does go over a page. Both subreports are set to grow and have the keep object together unchecked so paper is not wasted if not all the detail from the subreport would fit on the current page.

Just to see what would happen I added a new section after group footer 2a and moved the 2nd subreport to this new section. Doing so, the shared variable from the 2nd subreport will now show the correct value. I really need these two subreports to be in the same section so the data is next to each other.

Why would CR2008 get confused and show a value of zero for the 2nd sub-report's shared variable?

We are running CR2008 service pack 2.

Edited by: Mariellen Weatherman on Jan 4, 2011 11:15 AM - I forgot to mention it is only an issue for the last group of the report so I edited above.