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

CR Developer 8.5 & Report Footer Totals

Status
Not open for further replies.

ChrisH2

Programmer
Apr 18, 2002
44
GB
Hi all,

I am writing a report and I dont know how to produce the grand totals in the report footer for the following data.

The file contains three columns: Reference, Type and Value.

Ref Type Value
--- ---- -----
1 A 100
2 A 20
3 B 50
4 H 200
5 H 100
6 Z 800

The report shows the details as above in reference order,
but I want to show the totals like this: -

Type Value
==== =====
A 120
B 50
H 300
Z 800

This is a very simple version of what I am actually trying to do. Does anyone know how to achieve this without the overhead of using a subreport?

 
What about using an array variable to store a "surpressed" group footer total and then print the array in your report footer?

Paul Wesson, Programmer/Analyst
 
You could use running totals to display in the report footer. Using the running total expert, select {table.value}, sum, evaluate based on a formula:

{table.type} = "A"

Reset never.

Create separate running totals for each type and use text boxes for labels in the report footer.

Another approach which wouldn't slow your report as much as running totals, would be to create formulas for each type:

if {table.type} = "A" then {table.value}

Then right click on the formula and insert a grand total.

However, if you have many types, the simplest solution is to use an unlinked subreport to display the subtotals.

-LB
 
Thanks guys but I managed it with a cross-tab.
I really had to play about with the formatting but it looks ok.
 
You're right--THAT is the simplest solution.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top