Skip to main content
11-Garnet
October 21, 2020
Question

Struggling with creating a report

  • October 21, 2020
  • 1 reply
  • 1109 views

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-Report-in/idi-p/460592

 

1 reply

Marco Tosin
21-Topaz I
21-Topaz I
October 21, 2020

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