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

Query builder help, making a custom "where used" report


Query builder help, making a custom "where used" report

Hi, running PDMLink 7 m090 and Pro/E Wf3 m100.

We have certain classes of components that need to be included or excluded from a where used search. So I found NavigationAndActions.xml where I seemingly can put new action on most places, and there are some threads here that cover that.

Looking in the report manager I saw that we had no "where used" query in there to use, so I have to make one or find one, so I started out trying to make one but didn't get anything good going.

Can someone help me with this, either by pointing out where I can find a query like this to import, or what data I need to make my own.

I understand the criteria and sorting things, but the "from" (so many alternatives),"join"and select (whatfrom the data to use???)confuses me. Not a database guy at all...


Best regards


Query builder help, making a custom "where used" report


I'm not a database guy either, and unfortunately, there is almost zero
documentation on the query builder. Therefore a lot of trial and error
is involved.

The joins are used when you want to report information from objects with
a relationship to each other. Here's an example of one I created to
find CAD documents in an Approved state with out of date representations
(7.0 M020):

For the "From" tab, I selected three objects: CAD Document (because I
needed to report the document number), Representation (because I needed
to see if it existed), and Life Cycle History (because I needed to know
when the CAD doc entered the Approved state).

For the "Join" tab, I joined the CAD Document to the Life Cycle History
so that I could find the lifecycle state for the CAD doc. I also joined
the Representation to the CAD doc, so I could see if one existed or not.

The "Select" tab is just what you want displayed in the report. I
wanted to see the CAD doc number, who last updated it, the lifecycle
state and where it resides. The last one is a constant... I wanted each
line to display "OOD Representation" so that the viewer was certain of
what they were looking at.

Now the fun stuff... Criteria. Alll of the below criteria had to be met
in order for a result to appear in this report.

Lifecycle Action = Enter Phase
Lifecycle State = Approved
If you look at a lifecycle history, it shows the current state and the
action. There are generally two actions listed for each state: In the
Approved state there is an action of "Enter Phase" when you actually
first enter the state, then you have the "Set State" action when you are
preparing to set the state to something else.

Default Representation = 1 (True)
The CAD doc must have a default representation

CAD Doc Latest Iteration = 1 (True)
I must only see the latest iteration of the CAD doc

CAD Doc Updated by = <parameter>
I allowed users to enter their user id to filter the report to just
their CAD docs

Subtract > 0
(Its been a while so I may have this one backwards) I only wanted
results where the representation was created before the last update of
the CAD doc, so I subtracted the dates and said that this value had to
be >0.

CAD Doc Number NOT LIKE .prt
CAD Doc Number NOT LIKE .asm
I only wanted to report on 2-D CAD Docs, so I excluded all 3-d ProE CAD
docs from the report.

I'm not sure what specific data you would use to start with, but if you
goto the From tab and click "Add" then type in "part" and click the
"Show" button, you will see not only the "Part" type, but also a "Part
Usage" type. You'll probably need both and have to join them.

Good luck!

Robert M. Priest, PE, PMP
Lead Engineer
STERIS Corporation | Advanced Engineering Group

RE: Query builder help, making a custom "where used" report

Thanks Robert.

That goes alot in the line of what I was thinking, but trial and error among thousands of data sets and again tens of combination seems like a shot in the dark to me. And no documentation over the different dataset's is just crazy, how can PTC develop something like that?

I have tried all the logical combination with parts pand part.usage and part.uses and different link that could show a where used, but to no avail. 90% of them returns nothing, the rest just breaks down...

Im gonna log a call for support, but I think there must be someone here that has done this, either with the report manager or by makeing a customized search page in JSP and Java???
Best regards


RE: Query builder help, making a custom "where used" report

So, I found out that user the part.wtpart and part.partmaster then you can join them with an iterated usage link that can be used to find at least what a part uses. That's one step closer I guess, but the query is slow as ....

Noone else with a great idea?