I run multiple reports for the previous month. I use a dynamic query that selects records where the date falls in the previous month in my automated reports. I change the data field to reflect the record set I am looking for.
(woclass = 'WORKORDER' or woclass = 'ACTIVITY') and historyflag = 0 and istask = 0 and workorder.reportdate >= add_months(trunc(sysdate, 'MON'),-1) and workorder.reportdate < trunc(sysdate, 'MON')
I run my reports for multiple sites so I do not include a siteid. We are using Oracle.
------------------------------
Kevin Egolf
TechOps
------------------------------