0

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

Dec 13, 2016 at 06:29 PM

55

Former Member

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

Ian Waterman Dec 16, 2016 at 04:04 PM
0

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

Share
Former Member Mar 24, 2017 at 12:26 AM
0

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?

Show 1 Share

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

Ian