Class JasperPrintRenderer

java.lang.Object
org.adempiere.webui.window.JasperPrintRenderer

public class JasperPrintRenderer extends Object
Media renderer for JasperPrint
  • Field Details

    • jasperPrint

      protected net.sf.jasperreports.engine.JasperPrint jasperPrint
    • mediaSuppliers

      protected final Map<String,Supplier<org.zkoss.util.media.AMedia>> mediaSuppliers
  • Constructor Details

    • JasperPrintRenderer

      public JasperPrintRenderer(net.sf.jasperreports.engine.JasperPrint jasperPrint, String title)
      Parameters:
      jasperPrint -
      title -
    • JasperPrintRenderer

      public JasperPrintRenderer(List<net.sf.jasperreports.engine.JasperPrint> jasperPrintList, String title)
      Parameters:
      jasperPrintList -
      title -
  • Method Details

    • getMedia

      public org.zkoss.util.media.AMedia getMedia(String contentType, String fileExtension)
      Create media output for requested contentType+fileExtension
      Parameters:
      contentType -
      fileExtension -
      Returns:
      media
    • getExportFormats

      public IReportViewerExportSource.ExportFormat[] getExportFormats()
      Get supported export format
      Returns:
      export formats
    • getPreviewType

      public static ValueNamePair[] getPreviewType(boolean canExport)
      Get supported preview types
      Parameters:
      canExport - true if role has export right
      Returns:
      preview types
    • createPDF

      protected File createPDF() throws IOException, net.sf.jasperreports.engine.JRException
      Create PDF output
      Returns:
      PDF file
      Throws:
      IOException
      net.sf.jasperreports.engine.JRException
    • getPDF

      protected File getPDF()
      Get generated PDF file
      Returns:
      pdf file or null
    • setRowCount

      public void setRowCount(int rowCount)
      Set row count
      Parameters:
      rowCount -
    • getRowCount

      public int getRowCount()
      Get row count
      Returns:
    • getMIMEType

      public static String getMIMEType(String outputType)
      Get MIME type
      Parameters:
      outputType -
      Returns:
      MIME type
    • getFileExtension

      public static String getFileExtension(String outputType)
      Get file extension
      Parameters:
      outputType -
      Returns:
      file extension