2005 IR Help Posted August 27, 2006 Share Posted August 27, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now