Package com.basiscomponents.db.export
Class PdfExport
- java.lang.Object
-
- com.basiscomponents.db.export.PdfExport
-
public class PdfExport extends Object
-
-
Constructor Summary
Constructors Constructor Description PdfExport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static net.sf.jasperreports.engine.JasperPrint
exportToJasperPrint(File outputFile, ResultSet rs, SheetConfiguration sheetConfig, boolean baristaMode, int fitTo, boolean landscapeMode)
static File
exportToPDF(File outputFile, ResultSet rs, SheetConfiguration sheetConfig, boolean baristaMode, int fitTo, boolean landscapeMode)
Exports the content of the given ResultSet from a BBjGridExWidgetstatic File
exportToPDF(File outputFile, File customReport, ResultSet rs)
Exports the content of the given ResultSet from a BBjGridExWidgetstatic net.sf.jasperreports.engine.JasperPrint
fillReport(String jrxmlPath, net.sf.jasperreports.engine.JRDataSource jrDataSource)
Fills the report with all the datastatic File
writePdf(File outputFile, net.sf.jasperreports.engine.JasperPrint jasperPrint)
Writes the Pdf file
-
-
-
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 compilejrDataSource
- 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 filejasperPrint
- 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 fileresultSet
- The ResultSet to export.sheetConfig
- The sheet configuration for the reportbaristaMode
- indicator if the Barista header should be displayed or notfitTo
- content fitting indicatorlandscapeMode
- 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 FilereportName
- The name + path of the reportresultSet
- The ResultSet to export.- Returns:
- The final exported PDF file
-
-