That sounds like the problem I had a long time ago, and
I asked here. This is the reply I got from Brian then and have kept ever since
:
I have a couple thoughts, but it seems like you guys already tried them? First off, subreports are
always calculated last in a section. So they will always return zero in the section they are printed in.
No way around that. Now, Dreamcatcher said that he created a second footer section and put the
subreport there. I'm assuming you put the subreport, and ONLY THE SUBREPORT, in Footer Section A?
Always keep the subreport in its own section with nothing else in it. If you put it in section B
then it will be called last and not work for you.
Now, if you did all that and it doesn't work (which is should work, but maybe something else is
going wrong...) then you can put the subreport in the Detail section and suppress it. I wrote
about how to do this in Tutorial 9-6 of my CR Encylopedia book.
1. After making sure that the subreport formula works (and you get tons of blank space), add
it to ITS OWN SECTION (very important) in the main report.
2. Then go into the subreport and set EVERY section to be Suppressed. This disables printing
the sections but the formulas will still be calculated. Test to make sure it is blank.
3. Then on the main report right-click on the subreport and select Format Subreport. Click
on the Subreport tab and click the option Suppress Blank Subreport. This hides the subreport
when every section is suppressed. Save your changes.
4. On the main report, right-click on the gray area to the left of the section that has the
subreport and choose Section Expert. Click the option Suppress Blank Section. Save your changes.
This will keep the subreport from printing, but its calculations are still run.
That should do it! I tested this pretty well prior to writing about it and it works like a charm.