Skip to main content
1-Visitor
July 20, 2017
Question

How to create a WTDocument from Single Level BOM report export (PDF or execl) as primary content?

  • July 20, 2017
  • 2 replies
  • 1813 views

Am in need of,

1. Create a Single level BOM of any WTPart and export it as PDF format

2. Create a WTDocument using above PDF file as primary content

3. Associate WTDocument to WTPart (mentioned in Step 1)

 

Step 2 and 3 are quite straight forward.

But in Step 1, how to do I get PDF content stream at run time or how it would be downloaded particular location in server.

 

Note : All above 3 steps will be executed as process of WTPart work flow...

2 replies

17-Peridot
July 20, 2017

For item 1 you could run a workflow against the part in which you call a Cognos report.  There is a workflow helper method that will enable you to run a report and save it back to the PBO as an attachment.  This will require you to setup the Part with a workflow and also enable Attachements (which is a preference).

 

Help on the Worfklow helper method can be found here:  https://support.ptc.com/cs/help/windchill_hc/wc110_hc/index.jspx?id=ChgMgmtAffectedAffectedObjResulting&action=show

1-Visitor
July 20, 2017

Hello JeffZemsky,

Thanks for quick reply. I don't have cognos reporting, In other way will it work for normal (QueryBuilder) report?

avillanueva
23-Emerald I
July 27, 2017

I see where you are going with this but aren't you setting yourself up for data duplication? By saving the BOM as a PDF you are saying they should look at the PDF as the BOM.  Why not look at the single level report again when needed? Avoid the multiple sources of truth.