It's all about the answers!

Ask a question

RPE output from DNG. Styles not working for all artifact types

Shannon Struttmann (13211) | asked Mar 07 '18, 12:24 p.m.

I have two artifact types, one is Information and the other is a Level 2 Requirement. When I run RPE to export a word doc, I'm using a stylesheet to keep consistent formatting. The information artifacts work fine and are indented properly. The Requirement type artifact refuses to indent. Both are text, both are using the same style, both being exported via the richTextBody/div query. The only difference is that the requirement artifacts are colored blue, underlined, and have attributes. The requirement will be of that style, but the indenting will not show. (spacing before or after works)

Why can't I get the requirement type artifact to accept certain style elements?


Accepted answer

permanent link
Subramanya Prasad Pilar (4.6k14) | answered Mar 08 '18, 3:59 a.m.

You can remove the formatting from each requirement using java script (set "Script Expression" as the content for the Text element that prints dataSource/artifact/content/text/richTextBody/div). You can modify, add or remove formatting in the XHTML returned for div attribute.
Please refer

How are you applying the style from stylesheet? Is the style defined in stylesheet assigned to the element (Text or Paragraph) that prints div attribute? There is a metadata property (under Runtime -> Metadata in Launcher perspective) called "Data Formatting", which can be set to Mixed (default value), Source or Template. You can also try setting it to "Template".

Shannon Struttmann selected this answer as the correct answer

Shannon Struttmann commented Mar 08 '18, 8:46 a.m.

Thank you, I will give these all a try!

One other answer

permanent link
Shannon Struttmann (13211) | answered Mar 07 '18, 2:33 p.m.

It looks like for some reason the formatting got sorta 'locked-in' when they got imported from a different RM system. I can manually remove the formatting from each requirement and it will start taking styles correctly. If anyone knows of a way to automate the process of removing formatting from thousands of artifacts, I'd love to hear it.

Your answer

Register or to post your answer.