Former Member

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

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

10|10000 characters needed characters exceeded

• Dec 16, 2016 at 04:04 PM

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

10|10000 characters needed characters exceeded
• Former Member
Mar 24, 2017 at 12:26 AM

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?