Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hello Community,
I have an issue by generating a HTML Report. I want to get the content of a Requirement ( or any arbitrary category ) in a HTML report by using JavaScript. I've found a computational method provided by PTC Intgerity which facilitates to get the Content by a specific ID:
<%compute>getFieldValue(ID,"Content.fva")<%endcompute%>
This method returns the content BUT it is not able to pass the ID dynamically, e.g the ID has to be hard-coded to be able to use this method. I'm pretty sure that the
"<%compute%><%endcompute%> " tag is computed before the HTML Report is generated (and the html and javascript code is translated in browser). When you uncomment the <%compute>getFieldValue(ID,"Content.fva")<%endcompute%> statement and replace ID with a variable, the report cannot be generated though the statement is uncommented.
Does anybody know how I can solve this problem by getting a content by ID dynamically?
I'd really appreciate a solution and thank in advance for any kind of information
Kind regards
Martin
Solved! Go to Solution.
Hello mkocur,
You're correct about how this works, and I think you've hit a limitation of our reporting engine. The engine processes the <%...%> tags, then passes the resulting value statically to the browser to resolve. From discussing with others who know this functionality much better than I do, it seems that the way this works doesn't allow for any sort of dynamic ID provisioning.
The two recommended ways to deal with this sort of situation are:
Please let us know if either of those suggestions helped (by pressing the Correct Answer button), or if you need more information (by letting us know what additional information you need.
Regards,
Kael
Hello mkocur,
You're correct about how this works, and I think you've hit a limitation of our reporting engine. The engine processes the <%...%> tags, then passes the resulting value statically to the browser to resolve. From discussing with others who know this functionality much better than I do, it seems that the way this works doesn't allow for any sort of dynamic ID provisioning.
The two recommended ways to deal with this sort of situation are:
Please let us know if either of those suggestions helped (by pressing the Correct Answer button), or if you need more information (by letting us know what additional information you need.
Regards,
Kael
Thank you very much for your answer!
Unfortunately i have no skills in JSP and I've never heard about that before. But i will try to become acquainted in that.
Regards,
Martin
Hello mkocur,
Just to be sure I understand.
mkocur wrote:
I have an issue by generating a HTML Report. I want to get the content of a Requirement ( or any arbitrary category ) in a HTML report by using JavaScript.
Do you start your Report from integrity using a given ID?
- If so, why bother with the <%compute>getFieldValue(ID,"Content.fva")<%endcompute%>, as you can easily access the content if the ID directly during report generation on the Server.
- If not (meaning your HTML page uses some kind of Input to fetch the ID of interest and you want to reload the ID's content into you running session on demand), Michael is right and you Need to write a custom JSP with API Connections.
HTH Matthias
Hello,
Thank you very much for your answer!
the second idea is coorect. The user can specify an item's attribute with an arbitray ID for example to create a relationship or just to combine two items. Javascript should read that attribute (ID) and afterward show the content. So it's a dynamic request.
Regards,
Martin