Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Totals for Each Page in Group -- and location of Group Totals

Status
Not open for further replies.

LTillner

MIS
Apr 23, 2002
96
US
I have a series of reports that IF THEY ARE MULTIPLE PAGE (in a nested group), need to have a total at the bottom of each page and a summary of the indvidual page totals on the last page of the group with the group totals underneath.

My groups are:
Group 1 - District
Group 2 - Site
Detail --- <suppressed>
Group 2 footer -- totals for Site <visible>
Group 1 footer -- Totals for District <visible>

So, if Group 1 flows to multiple pages, the footer lines for group 2 need to have a PAGE # TOTAL line on each page
except the last page
WHERE the Group 1 footer should appear instead which gives the total for the Group.

What we used to do when the reports were manually generated via Excel is: each page had a Page # total
then the last page recapped --
Page 1 total
Page 2 total
Page 3 total
GRAND TOTAL:
Would it be possible to do that? or just too complicated?

I need help figuring out these formulas and where to put them!!!! Thanks! -- oh, and of course I needed this yesterday!

Lynette


 
Use manual running total variables.

In your group header 2, set variables to act as a flag and a counter.

whileprintingrecords;
numbervar flag := 1;
numbervar counter := 0;

In your suppressed details section:

whileprintingrecords;
numbervar counter := counter + {your field to be summed};

In the group 2 footer:

whileprintingrecords;
numbervar flag := 0;
numbervar counter;

In your page footer:

whileprintingrecords;
numbervar flag;
if flag = 1 then
numbervar counter;

As long as you pass your group footer 2 or page footer variable values to holding variable(s), you will be able to pass the values to the group 1 footer or report footer when you're ready for it.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top