Formatting Text in RPE
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:
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
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
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