cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate a running total for a specific job with most recent due date?

Former Member
0 Kudos

Hi,

I am trying to create a running total that only counts the job if it is a specific job with the most recent overdue date.

I tried a formula in the running totals field that used the Maximum Function that looks like this (but it wouldn't accept it):

Field to summarize: VIEW_WORK_REQ_OCC.JOB

Type of summary: count

Evaluate: use a formula - VIEW_WORK_REQ_OCC.JOB="PM-AA-500" and Maximum ({VIEW_WORK_REQ_OCC.DUE_DATE})

Reset: never

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ian,

I was not able to complete the formula because the second formula :

whileprintingrecords;

global numbervar JobCount;

If VIEW_WORK_REQ_OCC.JOB="PM-AA-500" and {VIEW_WORK_REQ_OCC.DUE_DATE} = Maximum ({VIEW_WORK_REQ_OCC.DUE_DATE}, {Group}) then JobCount:= JobCount + 1;

I received an error that read: "A number, currency amount, boolean, date-time, or string is expected here." where "VIEW_WORK_REQ_OCC." appears in the formula.

Help?

Former Member
0 Kudos

You have to replace , {Group} with the filed you are using to group data in section you want to evaluate JobCount.

Ian

Former Member
0 Kudos

You will probably need to use a Variable and build your own RT

Needs 3 formula

@Reset -- place this in group header

whileprintingrecords;

global numbervar JobCount:=0;

@Eval --place this in detail section

whileprintingrecords;

global numbervar JobCount;

If VIEW_WORK_REQ_OCC.JOB="PM-AA-500" and {VIEW_WORK_REQ_OCC.DUE_DATE} = Maximum ({VIEW_WORK_REQ_OCC.DUE_DATE}, {Group}) then JobCount:= JobCount + 1;

in group footer insert

@Display

whileprintingrecords;

global numbervar JobCount