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

Totals Not Calculating Properly 1

Status
Not open for further replies.

nlohrey

Technical User
Oct 16, 2002
23
0
0
US
My report reads a detail file and selects only records with a transaction date within a given date range. It also links to the matching header file and grabs a numeric field when the job# matches.... therefore not every header record in the file would be listed on the report. The selection works fine, but when I insert a Grand Total for the field that I got from the Header file, the value is greater than what the individual lines add up to on the report. I quickly did a report totaling that field for all records in the header file, but it did not match the number either. I need to total this field and tried many different ways... summing formulas, if/then/else, etc and I keep getting a number that doesn't make sense.
Is there a simple way to get a total for a record that is displayed on a report? Any help greatly appreciated!
 
You need to use running total fields instead of subtotals/grand totals because you have suppressed data.

see the last couple posts on thread767-584172
 
If you are conditionally suppressing records, abandon this approach and use the same logic to exclude these records from your report altogether using a record selection formula.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
I am using the record selection option to exclude the records from the report. That is why I am at a loss as to
why the total is off. I did try running total and I get the exact same result as the sum field. I will try and take the report apart and see if I can find out why the total doesn't work. THanks for the input.
 
I think you total is picking up the Header as many times as their are details. This is called table inflation and happens anytime you have a one-to-many relationship like this.

Usa a running total field to do your total, and set the "evaluate" to be "Once Per Group".

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Ken,
That solved it!! Thanks for explaining it!
Nadine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top