Quantcast
Channel: Support Portal
Viewing all articles
Browse latest Browse all 20315

Scheduled Custom Report for previous 8 days

$
0
0
Good day,

I am trying to create a report on closed and resolved tickets for a specific support group that has a custom date range. I would like to schedule this report to run every Wednesday morning and cover tickets from 12:00am the previous Wednesday until the time of running.  I built the basic report in the report builder, but it requires specifying a from date and a to date.  The "this week" and "last week" date options also don't seem to fit my need, as they run from Monday to Sunday.

I suspect that I will require a custom SQL query to pull the data I'm looking for, but am not sure how to define the floating date range. Any help would be appreciated.

For reference, I've included the SQL statement for the basic query I built.

SELECT ti.FIRST_NAME "Technician",wo.WORKORDERID "Request ID",wo.TITLE "Subject",wo.CREATEDTIME "Created Time",ti.FIRST_NAME "Technician" FROM WorkOrder wo LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID LEFT JOIN SDUser td ON wos.OWNERID=td.USERID LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID LEFT JOIN StatusDefinition std ON wos.STATUSID=std.STATUSID LEFT JOIN WorkOrder_Queue woq ON wo.WORKORDERID=woq.WORKORDERID LEFT JOIN QueueDefinition qd ON woq.QUEUEID=qd.QUEUEID WHERE  (((qd.QUEUENAME = N'Canada Field Software Support' COLLATE SQL_Latin1_General_CP1_CI_AS) AND ((std.STATUSNAME = N'Closed' COLLATE SQL_Latin1_General_CP1_CI_AS) OR (std.STATUSNAME = N'Resolved' COLLATE SQL_Latin1_General_CP1_CI_AS))) AND (((wo.CREATEDTIME >= 1390719600000) AND ((wo.CREATEDTIME != 0) AND (wo.CREATEDTIME IS NOT NULL))) AND ((wo.CREATEDTIME <= 1391324399000) AND (((wo.CREATEDTIME != 0) AND (wo.CREATEDTIME IS NOT NULL)) AND (wo.CREATEDTIME != -1)))))  AND wo.ISPARENT='1'  ORDER BY 1


Thank you,
Mike Taylor

Viewing all articles
Browse latest Browse all 20315

Trending Articles