Hyperlinks do not work when a Birt report is exported into Excel, PDF, ...
Hello all I have created a report with BIRT for RTC V 4.0.1.
The report shows a list of workitems. The column Work ID is linked through a hyperlink to the workitem.
When I run this report in RTC the work item opens successfully when I select the link. When I export this report from RTC into Excel, PDF, Word or ... the links do not open the work item. May I ask someone to help me to resolve this issue. Thanks in advance. Regards, Hansruedi
showing 5 of 9
show 4 more comments
|
Accepted answer
Hansruedi, Thanks for sending me the report design. Here is what is happening:
The URLs your report are generating are relative. You can find that out by making the report output the value: row["url"]. I can probably guess your next question: But you are prefixing the URL with: reportContext.getAppContext().get("SERVER_URL") The above call will always return null unless someone is trying to display a report or a report viewlet that is coming from a different jazz server. So our reports always try to use relative URLs unless it is necessary to use full URLs. So you cannot trust reportContext.getAppContext().get("SERVER_URL") to give you the server URL. I will change your defect into an enhancement request and start passing another variable: FULL_SERVER_URL that is guaranteed to always contain the server URL. Until then, you will need to hard code the server URL in your report or pass it as a parameter. Hansruedi Ehrenberg selected this answer as the correct answer
|
One other answer
Notice also that the format of the link could be different depending on the output format, by using the visibility property of the reporting artefact that computes the link.
|
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.
Comments
Can you be more specific about what happens when you click on the link from the exported report? Do you get an error, or is the link itself incorrect?
When I run the report in RTC a correct link is e.g. https://bt-clmserver01.hqs.sbt.siemens.com/ccm/web/projects/GDT%20Process%20and%20Infrastructure#action=com.ibm.team.workitem.viewWorkItem&id=7074
The mouse over on the same link in the Excel exported report shows the following link file:///C:\Users\EhrenbeH\AppData\Local\Microsoft\Temporary Internet Files\Content.IE5\IEYMS708\Report[1]xls - auto_generated_bookmark1.
When I click this link I get the error 'Reference is not valid.
I hope you can help me to resolve this issue. Thank you in advance.
Does the code you showed above put a hard link into the report (which should export correctly) or dynamically calculate the link? If it is dynamically calculated, it is unlikely that the "export to X" process exports the code for making the link (and there's a chance that code couldn't execute successfully in the exported environment anyway). For this to work, the exported link needs to be the same as the link in the report. Is it possible to re-work the report implementation so that the link is exportable?
Hello Millard
this is exactly my question: how do I have to implement the code for the link that the link will be the same in the exported report as it is in the RTC report. Can you help me?
Do you have an example?
Can you please open a defect in RTC and attach a sample report that duplicates the problem?
Sorry, may I ask you for the link that I can open a defect in RTC?
You can log a defect against Jazz Foundation here: https://jazz.net/jazz/web/projects/Jazz Foundation
Hello Rafik
I can not create a defect in RTC and attach the sample report. I got a permission denied error. Does it give another way to send you the report example?
Hello Rafik I have created the Defect 247880 in RTC and have attached the example report design. Thanks in advance for your help.