View number of suppressed groups in Report Header

Printed From: Crystal Reports Book — Forum Name: Technical Questions

I need some assistance here...
In my Report Header I want to display the number of unsuppressed Group Footers.
I can make it display correctly in the Report Footer. But I need it in the header.

I will call the main report MR, the subreport SR and a shared variable MyX.

Report design SR
All sections are suppressed.
SR calculates MyX based on its results.


Report design MR
GH
Resets MyX to 0.
Contains SR in order to calculate new MyX.
"Suppress Blank Sections" is checked.

D
Suppressed and empty.

GF
Contains my main fields.
Contains SR again, but here the SR is edited: If MyX>0 inside the SR, then its Details' section is not suppressed.
MyX is returned here. If MyX>=0 Then GF is suppressed via Section Expert.

results depending on sub report shared-variables cannot be displayed in the header so continuing down that line of thought will like end up in the same dead end each time.
Consider rethinking the process, like a another sub-report in the header that can can be trimmed down or simplified to get the same result across all the groups that might appear in the report and use that instead. Meaning, if you can run one summary query that uses the same logically conditions that all of your sub reports are doing at a more detailed level you could use that instead.
Just a thought...


Edited by DBlank - 14 Oct 2016 at 8:15am
So there's no way to identify a record as suppressed?
Is there a way to count empty subreports?

That subreport's data is just a stored procedure (1300 rows long, containing I think 19 queries). So maybe there's a way to skip the subreport route but I guess that would require many hours of thinking ;)
It is not so much an issue of counting suppressed items but that the way you are counting them is by using a shared variable. The shared variable results cannot be displayed in sections (like a report header) that precede the result of the shared variable.
If you know this as a limitation you can try to think of a different solution that can still get you the result you want, but not necessarily in the way that you were thinking of the data in the report. Meaning if you can run a separate query once that can replicate the 'group count' and run that in a report header you can bring back the result and use it anywhere in the report.
I redesigned the report to only retrieve what I want, no more need to suppress records.
More about that solution here:
http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=22128