Does anyone have example code for generating an excel spreadsheet.  I am
using Wicket 1.3 and I have used wicket.contrib.jasperreports to
successfully generate pdf files in IE but FireFox returns nothing. 
 Changing JRPdfResource to JRCsvResource returns a comma separated list but
the type it is returning is html for IE and nothing is showing up for
FireFox.  Using JRXlsResource returns nothing in IE or FireFox.

What I am attempting is to have a form submit the query criteria and return
a pdf or excel file.

Code to generate the file
final File reportFile = new File( context.getRealPath( "reports/test.pdf" )
);
return new JRPdfResource( reportFile ).setReportParameters( parameters
).setReportDataSource( customDataSource );

Code on the form
protected void onSubmit( AjaxRequestTarget target, Form form )
{
     JRResource pdfResource = new JasperReportUtility().generateReport();
     ReportsPanel.this.addOrReplace( new EmbeddedJRReport( "report",
pdfResource ).setOutputMarkupId( true ) );
     target.addComponent( ReportsPanel.this );
}

Thanks
Bushby
-- 
View this message in context: 
http://www.nabble.com/Generate-excel-spreadsheet-tp16898366p16898366.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to