cancel
Showing results for 
Search instead for 
Did you mean: 

I want to get a report of documents that are scanned into the "xxx" scanning queue.

Jenny_Le1
Star Contributor
Star Contributor

Hello,

I am first time user onbase running SQL queries, I need some input on how to put this together.

Part 1

I want to get a report of documents that are scanned into the "xxx" scanning queue. What I need to see is how many documents have been scanned for the previous week, broken down per day and per document type and per user.

so far this is what i got but i'm don't think it what suppose to be for above request

select sl.usernum, aq.batchnum, aq.queuename, sl.logdate, aq.batchname,
id.itemtypename, aq.numberdocuments, aq.totaldocuments, aq.totalpages
from hsi.scanninglog sl, hsi.archivedqueue aq, hsi.useraccount, hsi.doctype id
where aq.queuename = 'xxx'
and sl.logdate >=dateadd(day,datediff(day,0,GetDate())- 7,0)

Part 2

We want another report that tells us by day (for the previous week), how many documents went into the "abc" lifecycle, and how many left the "abc" lifecycle.

and for this i got

select wf.statenumto, wf.entrytime, wf.exittime, wf.usernum
from hsi.wflog wf
join hsi.useraccount ua on ua.usernum = wf.usernum
where statenumto = 108
and wf.entrytime >=DATEADD(day,datediff(day,0,GetDate())- 7,0)

greatly appreciate any help

1 ACCEPTED ANSWER

Chris_Arpajian
Confirmed Champ
Confirmed Champ

Hi Jenny,

Just a quick tip but did you look into using our Report Services module?  I see your organization is licensed for this module and it does come with multiple scanning and Workflow reports "out of the box".  Even if these don't give you 100% of what you wanted, depending on your access you could see the SQL used in these default reports as a basis to create your own SQL Query or a new report in Report Services.  Especially if you choose to export a report template and Import as a new report which you can then modify to your liking.

I hope that may help in some way.

Warm Regards,

Chris

View answer in original post

9 REPLIES 9

Nathan_Kumaras3
Champ in-the-making
Champ in-the-making

Change aq.queuename = 'xxx' to aq.queuenum = 'xxx'

Thanks Nathan

Ansley_Ingram
Elite Collaborator
Elite Collaborator

Hi Jenny,

If you're new to SQL, I'd recommend working with one of your DBAs to modify the canned report for your needs - especially if you are reporting against your production environment. There is additional information in the Report Services MRG on how the configuration, input parameters, etc. work outside of a need for a solid understanding of SQL and the OnBase database. 

Hope that helps.

Ansley

Thanks Ansley

Jenny_Le1
Star Contributor
Star Contributor

I've figured out.