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

Running total with summary value 2

Status
Not open for further replies.

Luvsql

Technical User
Apr 3, 2003
1,179
CA
I have suppressed GF2 by a certain criteria which prevents certain groups to not print. However, the summary I have, which is based on the detailed section still prints these suppressed values. I have tried to fix the issue by using a running total, but it will not allow me to insert the summary value as a running total. I have also tried to suppress the group values using Report > select expert, but the totals are still wrong.

How can I get correct totals if I have suppressed data? I can't use the data from the details nor will it allow me to use a running total.

I am using CR 9 with Top N based on GH2 All.
 
Create a manual running total that will accumulate summary values and build in the suppression criteria by using a formula like:

whileprintingrecords;
numbervar grpsum;

if not(put your suppression criteria here) then
grpsum := grpsum + sum({table.amt}, {table.groupfield});

But I'm not sure this is your problem. It would help if you provided your suppression criteria, sample results (including identifying group levels vs. details), and a display of what the report should look like.

-LB
 
I have groups: Location and Customer.
In the details section I have 3 formulas. Those are then summarized for both Location and CUstomer. Here is an example of the output (details aren't printed):

Total Over 60 Over 90
Location 1
Customer A $1000 900 100
Customer B 500 150 350
Customer C 0 (250) 250
Customer D (400) (400) 0
Total Loc 1 1100 400 700

Location 2
Customer A (500) 0 (500)
Total Loc 2 (500) 0 (500)

What I need is to suppress any customer totals <=0 ie

Location 1
Customer A $1000 900 100
Customer B 500 150 350
Total Loc 1 1500 1050 450

Loc 2 wouldn't even print becuase it's total was also <=0.

I am able to suppress the customer's totals and locations from printing easily by adding a report restriction Summaryfield>0, but the subtotals and totals are incorrect, since they are based strictly on the detailed amounts.
 
You should be able to create this with a running total. When creating the RT make sure you start with the lowest level number. for example {table.amount} Do not try to create a RT based on another total.

In the evaluation section, click on the formula button and enter the inverse of your supression logic. So if in your suppression formula you entered:

sum({table.amount},{table,Location} <= 0


You would enter:

sum({table.amount},{table,Location} > 0

Make sure you reset it at the proper group level.

Howard Hammerman,
Crystal Training and Crystal Material
On-site and public classes
Low-cost telephone/email support
FREE independent Crystal newsletter
howard@hammerman.com
800-783-2269
 
Fabulous, that worked perfectly!! Thank you! [2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top