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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show group footer totals in report footer

Status
Not open for further replies.

hpicken

Technical User
Apr 12, 2001
142
AU
I have a report which shows the following...

Report Header ... blah
Supplier Header ... blah
Rep Header ... blah
Rep Details ... figures etc
Rep Footer ... totals for rep plus running sum for each rep total
Supplier Footer ... totals for supplier
Report Footer ... Report totals

What I want to to do is show the total (the running sum) for each rep in the Report footer. Not the total for all Reps but the running sum of each.

Is this possible or will I have to do a sub-report to get the info?

TIA
 

sure.
set an invisible textbox to the sumval that you get
for each rep, let's say txt_thingtototal. Make a
private variable for the report, let's say runningtotal.
so you can do this:

on repfooter_format...
runningtotal = runningtotal + cint(txt_thingtototal)
txt_displayedtotal = runningtotal

-g


[hammer]
 
Yes, a subreport might be the way to go.

Copy this report under a new name and make all of the sections invisible except for the section that contains the total (rep footer).

Then, in your main report, insert this report as a subreport in the report footer.

Let me know if this helps....
 
Thanks for the replies guys but I think I will need to elaborate a bit more.

>Report Header ... blah
>Supplier Header ... blah
>Rep Header ... blah
>Rep Details ... figures etc
>Rep Footer ... totals for rep plus running sum for each rep total
... The running sum fields are hidden ...
>Supplier Footer ... totals for supplier
>Report Footer ... Report totals
...Rep 1 show final running total ...
...Rep 2 show final running total ...
...Rep 3 show final running total ...
...etc

If I add a sub report as KosmoKramer suggests I get 20 or so pages of running totals as there around 200 suppliers and about ten Reps.

The problem I see with evilmousse's solution is that at the end I would only get total for all reps not the individuals.

Basically I what to know the following.

1. What each Rep has done for each supplier
2. Totals for each Supplier
3. The overall totals for each Rep at the bottom of the report.

My thinking is that I might have to use an if statement so that when it gets to the end of the report (rep = last one) then make the running sum visible. Or somehow in the sub report telling it to show only the last entry for each Rep.

The only problem with this is that if the last supplier is looked after by only one rep, then only that rep will show in the totals.
 
Take out any page breaks or ForceNewPage options you might have set in the subreport. With those gone, and all other sections invisible, this would work....
 
CosmoKramer

This doesn't seem to work as there are anything up to 400 rep footers in a report. So when I include the same report (renamed) into the main report, I get all 400 rep footers being repeated. The report looks something like this

Report Header ... blah
Supplier 1
Rep 1
Rep 1 figures etc
Rep 1 Footer ... totals plus running sum
Rep 2
Rep 2 figures etc
Rep 2 Footer ... totals plus running sum
Supplier 1 Footer ... totals for supplier
Supplier 2
Rep 2
Rep 2 figures etc
Rep 2 Footer ... totals plus running sum
Rep 5
Rep 5 figures etc
Rep 5 Footer ... totals plus running sum
Rep 6
Rep 6 figures etc
Rep 6 Footer ... totals plus running sum
Supplier 2 Footer ... totals for supplier
Supplier 3
Rep 4
Rep 1 figures etc
Rep 4 Footer ... totals plus running sum
Supplier 3 Footer ... totals for supplier
etc... (200 plus suppliers and any combination of 20 Reps)
Report Footer ... Report totals

As you can see the Rep 2 footer appears twice (as most of them do).
Not all Reps sell for all the different Suppliers.

So the sub report also shows it twice (in this case)
I hope this makes more sense to you.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top