private JasperPrint getJasperPrint(JasperReport jasperReport, JRDataSource dataSource, Map<String, Object> jasperParameters) throws JRException { return JasperFillManager.fillReport(jasperReport, jasperParameters, dataSource); }
/** * Fills the compiled report design loaded from the file received as the first parameter * and places the result in the file specified by the second parameter. * * @param sourceFileName source file containing the compile report design * @param destFileName file name to place the generated report into * @param parameters report parameters map * @see JRFiller#fillReport(JasperReport, Map) */ public static void fillReportToFile( String sourceFileName, String destFileName, Map parameters ) throws JRException { File sourceFile = new File(sourceFileName); JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile); parameters = setFileResolver(sourceFile, parameters); fillReportToFile(jasperReport, destFileName, parameters); }
/** * @deprecated Replaced by {@link JasperFillManager#fillReportToStream(JasperReport, OutputStream, Map, JRDataSource)}. */ public static void fillReportToStream( JasperReport jasperReport, OutputStream outputStream, Map parameters, JRDataSource jrDataSource ) throws JRException { JasperFillManager.fillReportToStream( jasperReport, outputStream, parameters, jrDataSource ); }
/** * Fills the compiled report design loaded from the specified file and returns * the generated report object. * * @param sourceFileName source file containing the compile report design * @param parameters report parameters map * @param connection JDBC connection object to use for executing the report internal SQL query * @return generated report object */ public static JasperPrint fillReport( String sourceFileName, Map parameters, Connection connection ) throws JRException { File sourceFile = new File(sourceFileName); JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile); parameters = setFileResolver(sourceFile, parameters); return fillReport(jasperReport, parameters, connection); }
/** * @deprecated Replaced by {@link JasperFillManager#fillReportToFile(String, Map, JRDataSource)}. */ public static String fillReportToFile( String sourceFileName, Map parameters, JRDataSource jrDataSource ) throws JRException { return JasperFillManager.fillReportToFile( sourceFileName, parameters, jrDataSource ); }
/** * Fills the compiled report design loaded from the specified file and returns * the generated report object. * * @param sourceFileName source file containing the compile report design * @param parameters report parameters map * @return generated report object * @see JRFiller#fillReport(JasperReport, Map) */ public static JasperPrint fillReport( String sourceFileName, Map parameters ) throws JRException { File sourceFile = new File(sourceFileName); JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile); parameters = setFileResolver(sourceFile, parameters); return fillReport(jasperReport, parameters); }
/** * @deprecated Replaced by {@link JasperFillManager#fillReportToFile(String, Map, Connection)}. */ public static String fillReportToFile( String sourceFileName, Map parameters, Connection conn ) throws JRException { return JasperFillManager.fillReportToFile( sourceFileName, parameters, conn ); }
/** * @deprecated Replaced by {@link JasperFillManager#fillReport(String, Map, JRDataSource)}. */ public static JasperPrint fillReport( String sourceFileName, Map parameters, JRDataSource jrDataSource ) throws JRException { return JasperFillManager.fillReport( sourceFileName, parameters, jrDataSource ); }
/** * Fills the compiled report design loaded from the specified file and returns * the generated report object. * * @param sourceFileName source file containing the compile report design * @param parameters report parameters map * @param dataSource data source object * @return generated report object */ public static JasperPrint fillReport( String sourceFileName, Map parameters, JRDataSource dataSource ) throws JRException { File sourceFile = new File(sourceFileName); JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile); parameters = setFileResolver(sourceFile, parameters); return fillReport(jasperReport, parameters, dataSource); }
/** * Fills the compiled report design loaded from the file received as the first parameter * and places the result in the file specified by the second parameter. * * @param sourceFileName source file containing the compile report design * @param destFileName file name to place the generated report into * @param parameters report parameters map * @param dataSource data source object */ public static void fillReportToFile( String sourceFileName, String destFileName, Map parameters, JRDataSource dataSource ) throws JRException { File sourceFile = new File(sourceFileName); JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile); parameters = setFileResolver(sourceFile, parameters); fillReportToFile(jasperReport, destFileName, parameters, dataSource); }
/** * @deprecated Replaced by {@link JasperFillManager#fillReportToFile(JasperReport, String, Map, Connection)}. */ public static void fillReportToFile( JasperReport jasperReport, String destFileName, Map parameters, Connection conn ) throws JRException { JasperFillManager.fillReportToFile( jasperReport, destFileName, parameters, conn ); }
/** * @deprecated Replaced by {@link JasperFillManager#fillReportToStream(JasperReport, OutputStream, Map, Connection)}. */ public static void fillReportToStream( JasperReport jasperReport, OutputStream outputStream, Map parameters, Connection conn ) throws JRException { JasperFillManager.fillReportToStream( jasperReport, outputStream, parameters, conn ); }
/** * @deprecated Replaced by {@link JasperFillManager#fillReport(InputStream, Map, JRDataSource)}. */ public static JasperPrint fillReport( InputStream inputStream, Map parameters, JRDataSource jrDataSource ) throws JRException { return JasperFillManager.fillReport( inputStream, parameters, jrDataSource ); }
/** * Fills a report and saves it directly into a HTML file. * The intermediate JasperPrint object is not saved on disk. */ public static String runReportToHtmlFile( String sourceFileName, Map parameters, JRDataSource jrDataSource ) throws JRException { File sourceFile = new File(sourceFileName); /* */ JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile); parameters = JasperFillManager.setFileResolver(sourceFile, parameters); /* */ JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, jrDataSource); /* */ File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".html"); String destFileName = destFile.toString(); JasperExportManager.exportReportToHtmlFile(jasperPrint, destFileName); return destFileName; }
/** * Fills the compiled report design loaded from the file received as the first parameter * and places the result in the file specified by the second parameter. * * @param sourceFileName source file containing the compile report design * @param destFileName file name to place the generated report into * @param parameters report parameters map * @param connection JDBC connection object to use for executing the report internal SQL query */ public static void fillReportToFile( String sourceFileName, String destFileName, Map parameters, Connection connection ) throws JRException { File sourceFile = new File(sourceFileName); JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile); parameters = setFileResolver(sourceFile, parameters); fillReportToFile(jasperReport, destFileName, parameters, connection); }
/** * @deprecated Replaced by {@link JasperFillManager#fillReportToFile(String, String, Map, JRDataSource)}. */ public static void fillReportToFile( String sourceFileName, String destFileName, Map parameters, JRDataSource jrDataSource ) throws JRException { JasperFillManager.fillReportToFile( sourceFileName, destFileName, parameters, jrDataSource ); }
/** * @deprecated Replaced by {@link JasperFillManager#fillReportToStream(InputStream, OutputStream, Map, JRDataSource)}. */ public static void fillReportToStream( InputStream inputStream, OutputStream outputStream, Map parameters, JRDataSource jrDataSource ) throws JRException { JasperFillManager.fillReportToStream( inputStream, outputStream, parameters, jrDataSource ); }
/** * @deprecated Replaced by {@link JasperFillManager#fillReport(String, Map, Connection)}. */ public static JasperPrint fillReport( String sourceFileName, Map parameters, Connection conn ) throws JRException { return JasperFillManager.fillReport( sourceFileName, parameters, conn ); }
/** * Fills a report and saves it directly into a HTML file. * The intermediate JasperPrint object is not saved on disk. */ public static String runReportToHtmlFile( String sourceFileName, Map parameters, Connection conn ) throws JRException { File sourceFile = new File(sourceFileName); /* */ JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile); parameters = JasperFillManager.setFileResolver(sourceFile, parameters); /* */ JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn); /* */ File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".html"); String destFileName = destFile.toString(); JasperExportManager.exportReportToHtmlFile(jasperPrint, destFileName); return destFileName; }
/** * Fills the compiled report design loaded from the specified file. * The result of this operation is another file that will contain the serialized * {@link JasperPrint} object representing the generated document, * having the same name as the report design as declared in the source file, * plus the <code>*.jrprint</code> extension, located in the same directory as the source file. * * @param sourceFileName source file containing the compile report design * @param parameters report parameters map * @see JRFiller#fillReport(JasperReport, Map) */ public static String fillReportToFile( String sourceFileName, Map parameters ) throws JRException { File sourceFile = new File(sourceFileName); JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperReport.getName() + ".jrprint"); String destFileName = destFile.toString(); parameters = setFileResolver(sourceFile, parameters); fillReportToFile(jasperReport, destFileName, parameters); return destFileName; }