Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Jasper report - Orientation problem  RSS feed

garfild Baram
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, new Boolean(false));
printExporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, new Boolean(false));
printExporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE_ATTRIBUTE_SET, printAttributeSet);

How do change a reports orientation in the code?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!