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

Print pages range with Jasper 6


ddaitarn304gmail.com

Recommended Posts

With previous version I wrote:

JRPrintServiceExporter pse = new JRPrintServiceExporter();pse.setParameter(JRPrintServiceExporterParameter.JASPER_PRINT, Job.jrPrint );pse.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE, Printer.getService() );pse.setParameter(JRExporterParameter.START_PAGE_INDEX, startPage-1);pse.setParameter(JRExporterParameter.END_PAGE_INDEX, endPage-1);pse.exportReport();[/code]

 

With new version, I use "SimplePrintServiceExporterConfiguration" to configure printing, but I don't find how to set start / end page

JRPrintServiceExporter pse = new JRPrintServiceExporter();SimplePrintServiceExporterConfiguration configuration = new SimplePrintServiceExporterConfiguration();configuration.setPrintService(printService);pse.setConfiguration(configuration);          pse.setExporterInput(new SimpleExporterInput(jasperPrint));pse.exportReport();[/code]


 

Link to comment
Share on other sites

  • Replies 1
  • 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...