Jump to content
JasperReports Library 7.0 is now available ×

2005 IR Help

Recommended Posts

By: karthika - karthika

pdf,html

2004-05-15 23:56

can i use both at a same time. i mean i have two radio button pdf,html,excel etc.

is it possible?

post sample code please

 

 

 

 

 

By: Mark Engstrom - me2kme

RE: pdf,html

2004-05-18 05:22

 

Assuming you have an already filled JasperPrint object jdPrintOut.

 

From one buttons handler just call :

 

JasperExportManager.exportReportToPdfFile(jdPrintOut, strFilename);

 

From the other call :

 

JRXlsExporter exporter = new JRXlsExporter();

 

exporter.setParameter(JRExporterParameter.JASPER_PRINT, jdPrintOut);

exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, strFilename);

 

if ( !allOnOnePage ) {

exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);

} else {

exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);

exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);

}

 

exporter.exportReport();

 

Hope it helps.

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