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!

Total a Running Total Field - Can it be done? 1

Status
Not open for further replies.
Jan 8, 2001
163
US
Hi there. I have a bit of a problem that I hope someone can help me see the light on. Currently I have a report which looks like this…

Group 1: Company Name
Company_Name is printed here
Group 2: Publication Name
nothing prints here
Detail Lines
For each record printed one formula fields is defined as follows here
If a=1 then formula_x= field1
Similarly there is another field that is defined as
If a=2 then = formula_y = field1


Group 2: Footer
Other unrelated data prints here

Group 1: Footer
RunningTotalField_x = Max(formula_x)
RunningTotalField_Y = max(formula_y)


Each of these is evalutated on every record and resets each time there is a change in company_name Group 1.

Report Footer
Here I need to figure out how to sum each runningtotalfield_x and y and print it. Unfortunately, I can’t find any way to sum a running total. Is there a way to store this value into a variable and add to it as I go along? Basically I need to sum up the max(formula_x) for each company_name and print it at the end of the report.

Is that clear?

Does anyone have any advice? I would certainly appreciate it.

Thanks,
CrystalVisualBOracle
 
See the FAQ on running totals and look at the 3 formula technique. It will show you the syntax for initiating a variable and adding to it as you go. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Thanks Ken! I hoped there was a way to do it within CR but creating a view would probably be better anyway. I should've checked the FAQ archive first. I think my "spring fever" is starting to take it's toll! Thanks again.

CrystalVisualBOracle B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top