cancel
Showing results for 
Search instead for 
Did you mean: 

how do i report on total number of documents in OnBase

Andrew_Stelling
Champ in-the-making
Champ in-the-making

hello, 

I am new to Onbase administration.  How do get a report on total count of documents in OnBase?  

4 REPLIES 4

AdamShaneHyland
Employee
Employee

Hi @Andrew Stelling ,

 

You can run the following query in the database.  Keep in mind, depending on the number of documents in the system, this query may take a while to run, but will return an accurate count.

 

SELECT COUNT(*) FROM hsi.itemdata WITH (NOLOCK)

 

Alternatively, you could run the following which will be quicker, but might be less accurate depending on when statistics were last updated ...

 

SELECT CONVERT(bigint, rows) FROM sysindexes WHERE id = OBJECT_ID('hsi.itemdata') AND indid < 2 

 

Take care.

the status field on the itemdata table might be important too, unless you want deleted documents.  Though,  technically a request for a total count would include the deleted documents...   

To @Tom 's point, you can use the Database Reporting Guide if you want to constrain on a Document status (i.e. hsi.itemdata.status).

 

https://community.hyland.com/gallery/items/53200-database-reporting-guide

Philip_Montag
Confirmed Champ
Confirmed Champ

This script itemizes the number of documents per doc type.

 

SELECT itg.itemtypegroupname as DocTypeGroup, dt.itemtypename as DocType, count(itemnum) as DocTypeCount
FROM hsi.itemdata id with(nolock)
JOIN hsi.doctype dt with(nolock) ON id.itemtypenum = dt.itemtypenum
JOIN hsi.itemtypegroup itg with(nolock) ON dt.itemtypegroupnum = itg.itemtypegroupnum
GROUP BY itg.itemtypegroupname, dt.itemtypename
order by count(itemnum) desc