Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
How many documents are in a folder and its subfolders
Dimitri__Vanderheyde_(x-efsbruadmin_-_(deleted))
Our folders are grouped according to the various departments. I would like to write a LiveReport that gives the total number of documents in a folder and its subfolders grouped by department. For example, I would a number of all the documents in the Finance area then Communications, HR etc. I have written something but it does not work well. I have searched this Discussion but found nothing that could help me. Thanks.
Find more posts tagged with
Comments
Dave_Ebels_(jocoadmin_-_(deleted))
I use a live report to count files in a folder, and subsequent child or sub folders. The SQL in the live report is; select count(datasize)"File count" from dversdata where docid in (select dataid from dtree start with dataid in () connect by prior dataid=parentid)Remove and add your folder object ID. The report returns a file count using the parent object ID as a starting point. You can add as many object ID's as you like, seperated with commas. This only gives a file count, so I have created several live reports, named for the department, and I simply run them, copy & paste the results into excel and move to the next report. It does not take long, and I can look at a specific department any time I like.Another interestig tool I use is an adaptation of the 'Project Outline' feature. I created a URL object in my personal workspace and called it 'xyz folder outline'. In the URL added I placed the following ?func=Projects.ProjectOutline&objid=xxxxxx&ItemType_144=&ItemType_0=where again I add the object ID (xxxxxx) of a folder I want an outline for. Replace the x's with a folder object ID and run it. I hope these help!Dave EbelsJohnson Controlsdave.j.ebels@jci.com
Dimitri__Vanderheyde_(x-efsbruadmin_-_(deleted))
Thanks, a lot Dave! I will give this a try.
Chad Latka
Does this work for SQL Server 2000 ? select count(datasize)"File count" from dversdata where docid in (select dataid from dtree start with dataid in () connect by prior dataid=parentid)
Appu_Nair
No "connect by"is a Oracle construct. SQLserver will throw an error.In SQL server usually you need to create a function or stored proc that the Oracle software is doing.A lot of fully functioning examples are in this discussion area as recently as today.A great Oracle connect by link
http://www.databasejournal.com/features/oracle/article.php/3552521/Just-SQL-Part-VII--Hierarchical-Queries.htmA
great sqlserver link provided it is SQL2005
http://consultingblogs.emc.com/christianwade/archive/2004/11/09/234.aspx
Lenny_Walker
How would I get this to work with an input so i can count from a sepcfic container?