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!

Help with total formula

Status
Not open for further replies.

Jamesexcalibur

Programmer
Oct 19, 2013
1
US
Hi Everyone,

1st time poster and user of CR.. That being Said I cant figure out how to get a running total of a certain field.

Here is what I need to do:

if field 1="Machine 1" then take the amount in field 2 and total it all up for every record and display total at the end of the report

Machine 1 total calls = Total

or can anyone direct me via a link to a suitable example?

P.S. The only reason I am asking is I'm not sure how to look something like this up.

Thanks a Bunch!
James
 
In the Field Explorer (View --> Field Explorer) you'll see an entry titled Running Total Fields. Right click, New. That brings up the running total expert. Give your running total a name.

Hilite the Field2 on the left side, under Report Fields, and click the arrow to put it into the Field to Summarize field. Change the Type of Summary to Sum.

Under the Evaluate section, click the button next to "Use a Formula". Then click the X2 to open the Formula Editor - this is where you'll define the logic as to what records should be counted. For your report it would be:

{Field1} = "Machine 1"

Under the Reset section, you can leave it to Never unless there is some grouping going on in your report that you haven't mentioned.

Click OK and you'll now see the new RT formula.

You don't have to put it in the Details section, but it's probably a good idea to do so in order to visually confirm that you're only counting the proper records. If you are, move the running total formula to the report footer and you should be good to go.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top