Crystal Reports Running Total Evaluate Formula

I’ve been working with Running Total Fields and I have a question regarding the evaluate section on the Edit Running Total Field window. I’m in a situation where I need to add up an amount field for each unique case number in my data set, but I also need to look at several other fields on the record before I choose to add the value to the running total.

In the evaluate section, if I click the button next to “On Change of Field” I can choose the case number field but I don’t have the ability to add my other where conditions (Column X=“YES” and Column Y is within a specified date range).

If I choose “Use a Formula”, I know I can put the where clause conditions (Column X=“YES” and Column Y is within a specified date range), but I don’t see how I can include the condition to evaluate on each case number.

Here is an example of my Data
CASE — PERSON ID — IND_FLAG — AMOUNT — SERV_DT
A100 — P100 — Y — 10 — 2009-05-01
A100 — P101 — Y — 10 — 2009-05-01
A200 — P200 — Y — 50 — 2009-05-02
A200 — P201 — Y — 50 — 2009-05-02
A250 — P250 — N — 00 — 2009-05-15
A300 — P300 — Y — 70 — 2009-06-15
A300 — P301 — Y — 70 — 2009-06-15

In this situation, for the month of May, I want the running total field to contain 60 (10 from case A100 + 50 from case A200), for June, I just want to see 70.

Any suggestions?


ColoradoChris (BOB member since 2009-02-10)

Hello Chris,

Please follow the following steps:

1.Create a group on SERV_DT. This group should be for each month.
2.Now sort your records on amount field.
3.Create a running total.
4.Within running total in Field to Summarize select the amount field and summary as sum.
5.In the Evaluate section “Select on Change of Field”. Select Amount field.
6.In the Reset section “Select on Change of Group”. Select SERV_DT as group.
7.Click OK.
8.Place the running total formula in the group footer (SERV_DT group’s footer.

Thank you.
Regards
Manish :smiley:


cr_manish :india: (BOB member since 2009-07-30)