Class PdfExport


  • public class PdfExport
    extends Object
    • Constructor Detail

      • PdfExport

        public PdfExport()
    • Method Detail

      • exportToJasperPrint

        public static net.sf.jasperreports.engine.JasperPrint exportToJasperPrint​(File outputFile,
                                                                                  ResultSet rs,
                                                                                  SheetConfiguration sheetConfig,
                                                                                  boolean baristaMode,
                                                                                  int fitTo,
                                                                                  boolean landscapeMode)
      • fillReport

        public static net.sf.jasperreports.engine.JasperPrint fillReport​(String jrxmlPath,
                                                                         net.sf.jasperreports.engine.JRDataSource jrDataSource)
        Fills the report with all the data
        Parameters:
        jrxmlPath - The .jrxml file to compile
        jrDataSource - The data source that holds all the data fill the report with
        Returns:
        The final exported PDF file
      • writePdf

        public static File writePdf​(File outputFile,
                                    net.sf.jasperreports.engine.JasperPrint jasperPrint)
        Writes the Pdf file
        Parameters:
        outputFile - The output file
        jasperPrint - The Jasper Print that holds all the data to write
        Returns:
        The final exported PDF file
      • exportToPDF

        public static File exportToPDF​(File outputFile,
                                       ResultSet rs,
                                       SheetConfiguration sheetConfig,
                                       boolean baristaMode,
                                       int fitTo,
                                       boolean landscapeMode)
        Exports the content of the given ResultSet from a BBjGridExWidget
        Parameters:
        file - The output file
        resultSet - The ResultSet to export.
        sheetConfig - The sheet configuration for the report
        baristaMode - indicator if the Barista header should be displayed or not
        fitTo - content fitting indicator
        landscapeMode - indicator if the PDF should be created in landscape mode or else in portrait mode
        Returns:
        The final exported PDF file
      • exportToPDF

        public static File exportToPDF​(File outputFile,
                                       File customReport,
                                       ResultSet rs)
        Exports the content of the given ResultSet from a BBjGridExWidget
        Parameters:
        file - The output File
        reportName - The name + path of the report
        resultSet - The ResultSet to export.
        Returns:
        The final exported PDF file