Hyper link in rpe generated document
Hi,
I have given link to a word in an artifact. After Generating the document while clicking on the word it was opening the artifact (redirecting to the browser ) rather than going to the section in the word document.
I want to have an hyperlink once after generating the word document while clicking on the hyper linked word it should go inside the word document.
Can anyone provide the solution.
Thanks in Advance.
Regards,
Sunil
One answer
What you see is the default / expected behavior. In the document, you will see external hyperlinks to DNG artifacts. To have internal hyperlinks, you should first a bookmark for each artifact that is linked. You can use the following Script Expression (that gives last part of the linked artifact url) as COntent for Bookmark element in RPE template:
about.substring(about.lastIndexOf("/") + 1);
Use a RPE variable (_dngBase) and set its value as the part of url that corresponds to the DOORS Base URL:
_dngBase = about.substr(0, about.lastIndexOf("/")+1);
When printing the requirement text (div attribute), replace DOORS Base URL with '#' by using the following Script Expression:
div.replace(new RegExp(_dngBase, 'g'), '#');