• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jasper report - Orientation problem

 
garfild Baram
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic