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 to combine these two reports
Nicole_Bride
I have 2 reports I would like to put together, but I'm not sure how.The first one lists all the users, then you can click through to the sub report, which returns the number of documents with the total size in their Personal Workspace. Ideally, I would like to run one report, and have everything returned in a table view.I am passing "ID" from report 1 to the sub report. I would prefer to pass the node id of the personal workspace for each user, but it seems as though they are one in the same.REPORT 1:select ID, Name, LastName, Firstname, UserPrivileges from kuaf where name not like '%%(delete)%%' AND UserPrivileges not like '%%NULL%%' order by UserPrivileges, LastNameSUB REPORT:select d.lastname, d.firstname, b.ancestorid, count(c.docid) as "Number of Docs", sum((c.datasize+c.ressize)/1048576) as "Size (MB)" from dtree as a, dtreeancestors as b, dversdata as c, kuaf as d where b.dataid=a.dataid and a.dataid=c.docid and b.ancestorid=%1 and a.versionnum=c.version and a.ownerid = -(d.id) group by d.lastname, d.firstname, b.ancestorid
Find more posts tagged with
Comments
Tim_Hunter
I think this is what you want SELECT d.id , d.name , d.lastname , d.firstname , b.ancestorid , COUNT(c.docid) AS "Number of Docs", SUM((c.datasize+c.ressize)/1048576) AS "Size (MB)" , d.UserPrivileges FROM dtree a , dtreeancestors b, dversdata c , kuaf d WHERE b.dataid=a.dataidAND a.dataid =c.docidAND b.ancestorid=d.idAND a.versionnum=c.versionAND a.ownerid = -(d.id)AND d.name NOT LIKE '%%(delete)%%'AND d.UserPrivileges NOT LIKE '%%NULL%%'GROUP BY d.id , d.name , d.lastname , d.firstname , b.ancestorid, d.userprivileges