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

Running Totals in Group Headers

Status
Not open for further replies.

deborahb

Programmer
Oct 2, 2000
31
US
I have a report that has a running total. I am using a running total since I am not adding in the values from every record but only when there is a change in one of the fields. All works fine except that I'd like to display the final value in the group header.

Ex.

fld1 fld2 fld3 fld4
aaa 1 10 1
aaa 1 10 1
aaa 2 20 3
aaa 2 20 4

running total of fld3 = 30 (Only calculates when fld1 changes. Group header (fld1) I would like to display the 30.

Help!

Thanks,
Deborah
 
Running Totals don't work in Group Headers - they are calculated quite late in the processing cycle so have to be in the Group Footer in order to include all the records in the group.

Can you use a formula and a summary of the formula - they can be placed in the Group Header. They are calculated a lot earlier Editor and Publisher of Crystal Clear
 
Is it possible to create a formula in a header that uses next() or previous()?
 
I am afraid that if the only way to identify the records you want is by looking at a change from the record before/after, you will not be able to summarize these in the GH. The only time it can look at more than one record is on the WhilePrinting pass, which can't go backwards. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Ken -

Why cant a variable be created here and set to "while printing records"...wont that work, even if it is placed in the header?
 
This pass processes the records as they are encountered. The header occurs before it has encountered those records. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top