Jump to content
We've recently updated our Privacy Statement, available here ×

Creating Excel Byte Stream


2005 IR Help

Recommended Posts

By: Si Keen - swjkeen

Creating Excel Byte Stream

2004-09-08 00:39

I have a method producing a PDF report, as follows:

 

protected byte[] doReport(){

 

templateFile = baseDir + "test_report1.jasper";

JRDataSource tmds = new JRTableModelDataSource(reportDataTable);

 

return JasperRunManager.runReportToPdf(templateFile,

parameters,

tmds);

}

 

 

,where reportDataTable is populated earlier on. What is the best way to modify this to produce Excel output instead of PDF? (There is no runReportToXls method).

 

 

 

 

By: C-Box - c-box

RE: Creating Excel Byte Stream

2004-09-08 01:13

Perhaps you should us the FillReport method that returns a JasperPrint Object... with that object you can call the Exporter that has several methods to export a JasperPrint to different formats like PDF or CSV .....

 

 

hth

C-Box

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...