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

Struggling with creating a report

uai
Regular Member
Regular Member

Struggling with creating a report

Hello I am really struggling with creating a report that has a result like (or similar) to this query.


SELECT A0.Typ ,A0.namecontainerInfo ,pv.VALUE as Dokumenttyp ,COUNT(distinct d.IDA3MASTERREFERENCE) as Anzahl_Dokumente FROM
(SELECT A0.idA2A2,A0.namecontainerInfo, 'Bibliothek' as Typ FROM WTLibrary A0
UNION ALL SELECT A0.idA2A2,A0.namecontainerInfo, 'Produkt' as Typ FROM PDMLinkProduct A0) A0
,WTDocument d , WTTypeDefinition wttd,LWCTypeDefinition td ,LWCLocalizablePropertyValue pv
WHERE d.idA3containerReference = A0.idA2A2 and wttd.idA2A2 = d.IDA2TYPEDEFINITIONREFERENCE and td.name = wttd.logicalIdentifier
and pv.idA3B4 = td.idA2A2 group by A0.typ ,A0.namecontainerInfo, pv.VALUE order by a0.typ desc, a0.namecontainerInfo, pv.VALUE ;

It lists 4 colums Type of context (Product/Library) , Name of context, Documenttype  (Subtype), and count of WTDocmaster in this context

1.jpg

Can anyone guide me or upload an export. The issue are the relations to wttypdefinition etc.
PS: give your vote for

https://community.ptc.com/t5/Windchill-Ideas/Possibility-to-load-SQL-statements-in-Query-Builder-Rep...

 

1 REPLY 1

Re: Struggling with creating a report

Maybe you can take a look at this document where  you can find lots of report ready to use.

 

In the administrative section there are some reports similar to the one you are asking for.

 

 

Marco
Announcements