cancel
Showing results for 
Search instead for 
Did you mean: 

Reporting on Deferred Items

Anonymous
Not applicable
Hello,   I am looking for a way to report on deferred items. My use case is as below:   I have worked an item today, but have deferred the item for 10 days. The business would like to see a daily report that details out cases that have been deferred that day. IE say I worked 10 items today, but deferred 3 of them for 10 days, they would like a report to showing the 3 items that were deferred in addition to the others that were completed/excepted.    Thanks in advance!  
1 REPLY 1

BenKirimlidis
Level 7
/* Your DB name will be different, log into your MS SQL DB (ideally the mirror not the production DB) Substitute in your DB name for 'DATABASE_NAME' in the SQL query below. You can add to the WHERE clause to get only the records you are interested in Change up the query below to fit your needs */ declare     @LoadFromDate as datetime set            @LoadFromDate = getdate()-30;   -- gets everything from last 30 days select                             WQI.KeyValue                   ,WQI.LastUpdated                   ,WQI.Loaded                   ,WQI.Completed    ​​​​​​​                  ,WQI.Exception          ​​​​​​​                  ,WQI.Deferred     -- This is the field you are interested in ​​​​​​​                  ,WQI.Worktime     ​​​​​​​                  ,WQI.Data           -- Might not be needed but handy if you can extract the data ​​​​​​​                  ,WQI.SessionID  -- Useful to each action to a session ​​​​​​​                  ,WQI.[Status] ​​​​​​​                  ,WQI.ExceptionReason  from           [DATABASE_NAME].dbo.BPAWorkQueueItem as WQI with (nolock)    -- Your DB name is different where        WQI.LastUpdated >= @LoadFromDate ;