Jump to content
Changes to the Jaspersoft community edition download ×

How to print a report with default print


sj_so

Recommended Posts

Hello.. 

I'd like to know how to print a report with default print.

customers want to print a document with default print automatically.

are there any soultions to satisfy them..

 current iReport version is 4.5

JasperPrint print = null;
Map map = new HashMap();
for(int i=0; arrKeyValue.length>i; i++){
 
 
map.put(arrKeyName ,arrKeyValue);
 
logger.logInfo("arrKeyName  => " + arrKeyName);
logger.logInfo("arrKeyValue => " + arrKeyValue);
 
 
}
 
print = JasperFillManager.fillReport(reportFilePath, map,con);
jasperPrintList.add(print);
 
JRPdfExporter exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrintList);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, response.getOutputStream());
exporter.setParameter(JRPdfExporterParameter.IS_CREATING_BATCH_MODE_BOOKMARKS, Boolean.TRUE);
 
exporter.exportReport();
 

 

 

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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