It's all about the answers!

Ask a question

Formatting Text in RPE


Dylan Mansour (21516) | asked Sep 16 '16, 4:45 p.m.
Hello,

I am making a report in RPE pulling from DOORS.

I would like for the report to print object number and object heading on the same line with out stripping the format.

I used a text box with this script expression:
   'heading_number + " " + object_heading'
but it strips the formatting.

Looking to the future, I would also like the heading number displayed in the table of contents.

Thanks for your help.
Dylan

One answer



permanent link
Subramanya Prasad Pilar (4.6k16) | answered Sep 17 '16, 8:21 a.m.
edited Sep 17 '16, 9:57 a.m.
Hi Dylan,
You can use a Script Expression that also uses "level" attribute as explained in https://rpeactual.com/2016/09/17/printing-doors-object-heading-without-line-break/

The Script Expression can be:
var headingStartTag = '<heading level="' + level + '">';
var headingEndTag = '</heading>';
var val =  headingStartTag + heading_number + headingEndTag;
if(Object_Heading != ''){
 val = val + Object_Heading;
}
var replaceText = headingEndTag + headingStartTag;
val = val.replace(replaceText, " ");
val;

Hope you find the blog useful.

Regards,
Prasad

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.