RPE: Embed OLE Files from RTC
Hi!
I am running RPE 2.1.2 and I am trying to embed OLE files (.xml, doc, .pdf, etc) into my RPE output report using the href from RTC (workitem/workItem/auditableLinks/targetRef/referenceItem/href to be more specific). I have read from other users to use Include File from RPE. I have tried that and when running the report, I get an xml output in my Word document that seems to be the metadata of the link, which includes the file name, link, and other information.
I have also read to use the Field from RPE and haven't had any luck.
Any help would be great!!!
- Sabino
2 answers
Hi Sabino,
Do you mean the metadata of the link is something like {INCLUDETEXT "file:C:/temp/.... .rtf" * MERGEFORMAT} ? Then make sure you set
1. Update Fields = true in Specification > Output: Word* (and PDF, Html...)
or
2. Specify the stylesheet file path to "rpe.dot" with macro name "rpe" when generating a Word document. This macro will update OLE objects into the document.
Comments
Hi Kenji,
Thank you for your response.
The data doesn't contain {INCLUDETEXT....
It's more like the following output:
<?xml version="1.0" encoding="UTF-8"?>...
<dc:identifier>[ID]</dc:identifier>
<dc:title>[File name].xlsx</dc:title>
<dc:description>[File name].xlsx</dc:description>
<dc:format>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</dc:format>...</rtc_cm:Attachment>
There is no direct way to do this in RPE. This should be similar to generating RPE Word output with RQM test case attachments embedded as OLE.
https://jazz.net/blog/index.php/2017/05/30/generating-word-document-from-rational-publishing-engine-with-attachments-embedded-as-objects/
Instead of using RQMUrlUtility.jar, you can try curl. You can download the attachments (workitem/workItem/auditableLinks/targetRef/referencedItem/href) to local path and then embed them as OLE. Use workitem/workItem/auditableLinks/targetRef/comment as file name. Use the condition workitem/workItem/auditableLinks/name == "com.ibm.team.workitem.linktype.attachment" so that this is done only when WI has attachments.