What is a proper way to include report into a word document?
In general, task is to insert a grid produced by report definition into word (2013) file in Pega 7.1.6. I've tried to utilize the CreateMergedWordDoc
flow action from PegaSample, however it did not work as Word version 15 is not supported by the embeded silverlight control. My current approach is to use AttachAndHold action from Work-, but still many problem arise. To include a report definition result, I put a section with grid layout into a correspondence, which is in turn merged with a word file. As far as I understand, merge is done in the following manner:
- Process Commander puts a text file, which contains our correspondence, into client filesystem;
- MS Word is initiated;
- user accepts embeded content in word;
- AutoOpen macro is executed. This macro simply takes text from a file generated by Process Commander and puts its contents into opened Word document.
After macro has executed, a Word file contains HTML code of correspondence - Word seems to be unable to handle markup. So, having no more ideas in mind, i wrote a parser in visual basic and included it in AutoOpen macro. This is obviously not the best solution, as it is neither maintainbale nor scalable. Maybe it is possible to write custom section with report, which will be understandable for Word.
In general, task is to insert a grid produced by report definition into word (2013) file in Pega 7.1.6. I've tried to utilize the CreateMergedWordDoc
flow action from PegaSample, however it did not work as Word version 15 is not supported by the embeded silverlight control. My current approach is to use AttachAndHold action from Work-, but still many problem arise. To include a report definition result, I put a section with grid layout into a correspondence, which is in turn merged with a word file. As far as I understand, merge is done in the following manner:
- Process Commander puts a text file, which contains our correspondence, into client filesystem;
- MS Word is initiated;
- user accepts embeded content in word;
- AutoOpen macro is executed. This macro simply takes text from a file generated by Process Commander and puts its contents into opened Word document.
After macro has executed, a Word file contains HTML code of correspondence - Word seems to be unable to handle markup. So, having no more ideas in mind, i wrote a parser in visual basic and included it in AutoOpen macro. This is obviously not the best solution, as it is neither maintainbale nor scalable. Maybe it is possible to write custom section with report, which will be understandable for Word.
So, i would really appreciate any ideas or research directions on how I should include section into doc-file or another way to put report into doc.
P.S. It was strict requirement to use Word, as this file is expected to be edited by a person.
***Updated by moderator: Lochan to close post***
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.