Jump to content
JasperReports Library 7.0 is now available ×

Sub: Getting a Jasper HTML Report into a stri


Recommended Posts

By: raja rao budaraju - rajaraob

Sub: Getting a Jasper HTML Report into a stri

2003-11-05 05:35

 

 

I wanted to create a HTML report and in a web app and wanted to export html from a jprint file into a string (instead of a htmlfile!).

 

I thought the following api will be useful but doesnot seem to help,

 

static java.lang.String JasperExportManager.exportReportToHtmlFile(java.lang.String filename)

 

I wrote code as follows

 

String tempString;

String absolutePath="/<absolutepath>/datatestreport.jrprint"

 

tempString = JasperExportManager.exportReportToHtmlFile( absolutePath);

 

where absolutePath contains the absolute path of .jrprint file.

 

When i executed this , tempString contains "/<absolutepath>/datatestreport.jrprint"

(this is value of absolutePath variable passed to the function)!!!!

 

I donot understand what this function should be used for, and this does not seem to serve my purpose.

 

 

I would like to use some mechanism where the .jrprint is pre created and then populate this with data from a dB. But my bottleneck is that the output is only available in a html file. More over any images that are included in the report are linked with reference to the html file directory which does not seem to be configurable.

 

Please help me with more inputs about my requirement.

 

Thanks in Advance,

 

RajaRao

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...