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

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

Highlighted
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

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

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;

Announcements
LiveWorx Call For Papers Happening Now!