Jump to content
Changes to the Jaspersoft community edition download ×

Printer Service lookup during report export


Recommended Posts

By: Umberto Uderzo - uuderzo

Printer Service lookup during report export

2004-01-05 01:45

Hi all!


I'm building a framework around JasperReport and I managed to store all the PrintRequestAttributes in my data structures before launching Jasper. So I can pass the parameters directly to Jasper through the exporter.setParameter( JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET, printRequestAttributeSet) method of the JRPrintServiceExporter class without calling the Printer dialog. I noticed that if I send a non void parameters set I get an exception that tells me that there is no suitable printer found. I looked to the exporter sources and noticed that in the lookup phase the algorithm uses both PrintServiceAttributes and PrintRequestAttributes. But The latter are PrinterJob attributes, and are not useful for the service lookup. So I managed to send only the PrintServiceAttributes for the lookup, and to send the PrintRequestAttributes to the job. It worked perfectly. I suppose this might be corrected in the official sources. What do you think about?


Thanks in advance... Umberto

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