Skip to main content
14-Alexandrite
January 30, 2017
Question

Query builder report of WTPart has duplicate results

  • January 30, 2017
  • 1 reply
  • 2010 views

I'm trying to create a report with query builder that shows WTParts with IBAs & two different WTDocument types with their IBAs associated with that WTPart. I've been able to show the WTPart with it's IBAs & the documents. But when I add IBAs from one of my WTDocuments, I receive many duplicate results. Does anyone know what I can do to prevent these duplicate results?

1 reply

1-Visitor
January 31, 2017

It might be because of derived columns included in the select or a wrong join. If your select is on non-derived  columns, then you can check the distinct check box in the select properties. Could you paste a screenshot of the joins or even post the QML?

tgudobba14-AlexandriteAuthor
14-Alexandrite
January 31, 2017

Binesh,

Here is the QML. I guess I don't understand the difference between derived & non-derived. Can you explain the differences? I also did not see a distinct checkbox in the select properties.

1-Visitor
February 1, 2017

Derived attributes are the ones with out a green arrow, when you pick the attributes in the select. In below screenshot, except name and number, rest are all derived attributes. So when you  select distinct (Select the "Select Tree" in the select tab and you will see distinct checkbox on right), it is applicable only to non derived attributes.

In your case, since you have picked attributes from multiple subtypes of wtdocuments, it results in duplicate rows, along with that you have selected the root document type as well. Instead what you can do is you can create a independent queries and union all of them.Unfortunately this cannot be done from the user interface. You will have to edit the QML and import it. Hope this is fixed in WC11.

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS157493