PDA

View Full Version : Hyperlink in BIRT report not getting displayed



tanmoy
01-20-2006, 07:37 AM
one of my BIRT report contains a hyperlink. the report with the hyperlink gets displayed in the eclipse BIRT preview.

But when i run the same report in pentaho as html , entire report gets displayed without the hyperlink.

do i need to add any special pentaho xaction tag for displaying BIRT report hyperlink.

kindly help to solve the problem

mbatchelor
01-20-2006, 10:59 AM
Hi there,

I'm sorry you're experiencing problems with the Birt component. It turns out to be an omission in the EmitterConfig object within the BIRTReportComponent.

If you go into BIRTReportComponent.java, at or around line 294, you'll see the following line of code:


htmlConfig.setImageHandler(new HTMLServerImageHandler());


To add support for URLs, the HTMLEmitterConfig object needs an additional handler:



htmlConfig.setActionHandler(new HTMLActionHandler( ));


Additionally, for this to work, we have to add an import at the top of the BIRTReportComponent as follows:



import org.eclipse.birt.report.engine.api.HTMLActionHandler;


I've checked these changes into our CVS, but if you want to try to make the changes yourself and copy the resulting class to the pentaho.war/WEB-INF/classes/org/pentaho/birt directory, you can test it yourself. Otherwise, it'll be fixed in the next build.

Take care, and thanks for pointing this out,

Marc

tanmoy
01-24-2006, 04:18 AM
Thnx, your solution helped us out

freshasp
01-27-2006, 04:46 AM
I cannot complete my current project without BIRT HTML link functionality but, unless I am hugely mistaken, I need to build Pentaho from source. Despite my best efforts to follow the instructions in the Advanced Install Guide I cannot compile Pentaho (42 compilation errors).

I am also worried that getting the CVS source is going to give me a set of classes that are out of line with the rest of the application.

I don't suppose anyone has the fixed class file that will allow HTML links in BIRT reports?! :)

Thanks,
Paul

Post edited by: freshasp, at: 01/27/2006 08:50

tanmoy
01-27-2006, 05:36 AM
u only need to change the BirtReportComponent.java class in pentaho to add
htmlConfig.setActionHandler(new HTMLActionHandler( )); as suggested by Marc

compile it and then replace in ur pentaho class files.

Or else u can get latest file from the pentaho cvs as marc has already placed it there , compile it and replace in ur pentaho solution

freshasp
01-27-2006, 05:42 AM
Thanks, I worked out what I need to do. If only I had an environment setup that would enable it to happily compile! I am undoubtedly missing something obvious but I cannot persuade Eclipse/Ant to build Pentaho. I will keep plugging away but I am using up so much time on this that I am on the verge of having to give up.

As you can tell, I am no Java dev.... :)

Phew! Finally cracked it! Class file slotted into place and I have my hyperlinks. All is well. This the price you pay for having a product that puts analysts near the code ;)

Post edited by: freshasp, at: 01/27/2006 09:51