cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How to create a querybuilder report that counts the number of objects in a Product

JeffBrodsky
1-Newbie

How to create a querybuilder report that counts the number of objects in a Product

I am using Windchill 10.1 M040, and attempting to determine how many objects (parts, documents, epmdocs, whatever) are in each of my products.

I am thinking querybuilder can do this, but the count function gives me an error "A statement with aggregate function can not be used with access control."

Has anyone built such a query (and can share)?

1 REPLY 1

Jeff, Below Query will give you all object types by count in every Product Context by folder name:

SELECT b.total_objects,b.CLASSNAMEKEYROLEBOBJECTREF, subfolder.name, pdmlinkproduct.namecontainerinfo
FROM subfolder,
pdmlinkproduct,
(SELECT Count(*) total_objects, ida3a5,CLASSNAMEKEYROLEBOBJECTREF
FROM iterfoldermemberlink
WHERE classnamekeyroleaobjectref = 'wt.folder.SubFolder'
GROUP BY ida3a5,iterfoldermemberlink.CLASSNAMEKEYROLEBOBJECTREF) b
WHERE subfolder.ida2a2=b.ida3a5 AND subfolder.ida3containerreference=pdmlinkproduct.ida2a2
ORDER BY namecontainerinfo;

Top Tags