• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Jasper report - Orientation problem

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a report with landscape orientation.
Using the following code prints the report as "Portraite" orintation and not "Landscape" as I want.
Map parameters = reportParameters.getParametersMap();

ByteArrayInputStream in = new ByteArrayInputStream(compiledOutput.toByteArray());
JasperPrint jasperPrint = JasperFillManager.fillReport(in, parameters, Database.instance().getConnection());

JRAbstractExporter printExporter = new JRPrintServiceExporter();
printExporter.setParameter(JRExporterParameter.JASPER_PRINT,jasperPrint);
printExporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, new Boolean(false));
printExporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, new Boolean(false));
printExporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE_ATTRIBUTE_SET, printAttributeSet);
printExporter.exportReport();

How do change a reports orientation in the code?
Thanks
 
Hey! Wanna see my flashlight? It looks like this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!