Class JasperFillManager


  • public final class JasperFillManager
    extends java.lang.Object
    Facade class for filling compiled report designs with data from report data sources, in order to produce page-oriented documents, ready-to-print.

    It exposes a variety of methods that receive a report template in the form of an object, file, or input stream, and also produces a document in various output forms (object, file, or output stream).

    All methods receive a Map object that should contain the values for the report parameters. These values are retrieved by the engine using the corresponding report parameter name as the key.

    There are two types of method signatures with regards to the data source provided for filling the report:

    • Methods that receive an instance of the JRDataSource interface and use it directly for retrieving report data;
    • Methods that receive an instance of the java.sql.Connection interface and retrieve the report data by executing the report internal SQL query through this JDBC connection and wrapping the returned java.sql.ResultSet object inside a JRResultSetDataSource instance.
    Author:
    Teodor Danciu (teodord@users.sourceforge.net)
    See Also:
    JasperReport, JRDataSource, JRFiller, JasperPrint
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PROPERTY_LEGACY_RELATIVE_PATH_ENABLED
      Deprecated.
      The property should only be set when upgrading from a version older than 6.6.0 with a repository that relied on the fact that paths were relative to the master report.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      JasperPrint fill​(java.io.InputStream inputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Fills the compiled report design loaded from the supplied input stream and returns the generated report object.
      JasperPrint fill​(java.io.InputStream inputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters, java.sql.Connection connection)
      Fills the compiled report design loaded from the supplied input stream and returns the generated report object.
      JasperPrint fill​(java.io.InputStream inputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters, JRDataSource dataSource)
      Fills the compiled report design loaded from the supplied input stream and returns the generated report object.
      JasperPrint fill​(java.lang.String sourceFileName, java.util.Map<java.lang.String,​java.lang.Object> params)
      Fills the compiled report design loaded from the specified file and returns the generated report object.
      JasperPrint fill​(java.lang.String sourceFileName, java.util.Map<java.lang.String,​java.lang.Object> params, java.sql.Connection connection)
      Fills the compiled report design loaded from the specified file and returns the generated report object.
      JasperPrint fill​(java.lang.String sourceFileName, java.util.Map<java.lang.String,​java.lang.Object> params, JRDataSource dataSource)
      Fills the compiled report design loaded from the specified file and returns the generated report object.
      JasperPrint fill​(JasperReport jasperReport, java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Fills the compiled report design supplied as the first parameter and returns the generated report object.
      JasperPrint fill​(JasperReport jasperReport, java.util.Map<java.lang.String,​java.lang.Object> parameters, java.sql.Connection connection)
      Fills the compiled report design supplied as the first parameter and returns the generated report object.
      JasperPrint fill​(JasperReport jasperReport, java.util.Map<java.lang.String,​java.lang.Object> parameters, JRDataSource dataSource)
      Fills the compiled report design supplied as the first parameter and returns the generated report object.
      JasperPrint fillFromRepo​(java.lang.String reportLocation, java.util.Map<java.lang.String,​java.lang.Object> params)
      Fills the compiled report design loaded from the specified file and returns the generated report object.
      JasperPrint fillFromRepo​(java.lang.String reportLocation, java.util.Map<java.lang.String,​java.lang.Object> params, java.sql.Connection connection)
      Fills the compiled report design loaded from the specified file and returns the generated report object.
      JasperPrint fillFromRepo​(java.lang.String reportLocation, java.util.Map<java.lang.String,​java.lang.Object> params, JRDataSource dataSource)
      Fills the compiled report design loaded from the specified file and returns the generated report object.
      static JasperPrint fillReport​(java.io.InputStream inputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters)  
      static JasperPrint fillReport​(java.io.InputStream inputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters, java.sql.Connection connection)  
      static JasperPrint fillReport​(java.io.InputStream inputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters, JRDataSource dataSource)  
      static JasperPrint fillReport​(java.lang.String sourceFileName, java.util.Map<java.lang.String,​java.lang.Object> params)  
      static JasperPrint fillReport​(java.lang.String sourceFileName, java.util.Map<java.lang.String,​java.lang.Object> params, java.sql.Connection connection)  
      static JasperPrint fillReport​(java.lang.String sourceFileName, java.util.Map<java.lang.String,​java.lang.Object> params, JRDataSource dataSource)  
      static JasperPrint fillReport​(JasperReport jasperReport, java.util.Map<java.lang.String,​java.lang.Object> parameters)  
      static JasperPrint fillReport​(JasperReport jasperReport, java.util.Map<java.lang.String,​java.lang.Object> parameters, java.sql.Connection connection)  
      static JasperPrint fillReport​(JasperReport jasperReport, java.util.Map<java.lang.String,​java.lang.Object> parameters, JRDataSource dataSource)  
      static void fillReportToFile​(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map<java.lang.String,​java.lang.Object> params)  
      static void fillReportToFile​(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map<java.lang.String,​java.lang.Object> params, java.sql.Connection connection)  
      static void fillReportToFile​(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map<java.lang.String,​java.lang.Object> params, JRDataSource dataSource)  
      static java.lang.String fillReportToFile​(java.lang.String sourceFileName, java.util.Map<java.lang.String,​java.lang.Object> params)  
      static java.lang.String fillReportToFile​(java.lang.String sourceFileName, java.util.Map<java.lang.String,​java.lang.Object> params, java.sql.Connection connection)  
      static java.lang.String fillReportToFile​(java.lang.String sourceFileName, java.util.Map<java.lang.String,​java.lang.Object> params, JRDataSource dataSource)  
      static void fillReportToFile​(JasperReport jasperReport, java.lang.String destFileName, java.util.Map<java.lang.String,​java.lang.Object> parameters)  
      static void fillReportToFile​(JasperReport jasperReport, java.lang.String destFileName, java.util.Map<java.lang.String,​java.lang.Object> parameters, java.sql.Connection connection)  
      static void fillReportToFile​(JasperReport jasperReport, java.lang.String destFileName, java.util.Map<java.lang.String,​java.lang.Object> parameters, JRDataSource dataSource)  
      static void fillReportToStream​(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters)  
      static void fillReportToStream​(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters, java.sql.Connection connection)  
      static void fillReportToStream​(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters, JRDataSource dataSource)  
      static void fillReportToStream​(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters)  
      static void fillReportToStream​(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters, java.sql.Connection connection)  
      static void fillReportToStream​(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters, JRDataSource dataSource)  
      void fillToFile​(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map<java.lang.String,​java.lang.Object> params)
      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.
      void fillToFile​(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map<java.lang.String,​java.lang.Object> params, java.sql.Connection connection)
      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.
      void fillToFile​(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map<java.lang.String,​java.lang.Object> params, JRDataSource 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.
      java.lang.String fillToFile​(java.lang.String sourceFileName, java.util.Map<java.lang.String,​java.lang.Object> params)
      Fills the compiled report design loaded from the specified file.
      java.lang.String fillToFile​(java.lang.String sourceFileName, java.util.Map<java.lang.String,​java.lang.Object> params, java.sql.Connection connection)
      Fills the compiled report design loaded from the specified file.
      java.lang.String fillToFile​(java.lang.String sourceFileName, java.util.Map<java.lang.String,​java.lang.Object> params, JRDataSource dataSource)
      Fills the compiled report design loaded from the specified file.
      void fillToFile​(JasperReport jasperReport, java.lang.String destFileName, java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Fills the compiled report design received as the first parameter and places the result in the file specified by the second parameter.
      void fillToFile​(JasperReport jasperReport, java.lang.String destFileName, java.util.Map<java.lang.String,​java.lang.Object> parameters, java.sql.Connection connection)
      Fills the compiled report design received as the first parameter and places the result in the file specified by the second parameter.
      void fillToFile​(JasperReport jasperReport, java.lang.String destFileName, java.util.Map<java.lang.String,​java.lang.Object> parameters, JRDataSource dataSource)
      Fills the compiled report design received as the first parameter and places the result in the file specified by the second parameter.
      void fillToStream​(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Fills the compiled report design loaded from the supplied input stream and writes the generated report object to the output stream specified by the second parameter.
      void fillToStream​(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters, java.sql.Connection connection)
      Fills the compiled report design loaded from the supplied input stream and writes the generated report object to the output stream specified by the second parameter.
      void fillToStream​(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters, JRDataSource dataSource)
      Fills the compiled report design loaded from the supplied input stream and writes the generated report object to the output stream specified by the second parameter.
      void fillToStream​(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter.
      void fillToStream​(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters, java.sql.Connection connection)
      Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter.
      void fillToStream​(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map<java.lang.String,​java.lang.Object> parameters, JRDataSource dataSource)
      Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter.
      static JasperFillManager getInstance​(JasperReportsContext jasperReportsContext)  
      protected JasperReportsContext getLocalJasperReportsContext​(java.io.File file)
      Deprecated.
      replaced by JasperReportSource
      protected JasperReportSource getReportSource​(java.io.File reportFile)  
      protected JasperReportSource getReportSource​(java.io.File reportFile, JasperReport jasperReport)  
      protected JasperReportSource getReportSource​(java.lang.String location)  
      protected static JasperReportSource getReportSource​(JasperReportsContext jasperReportsContext, java.io.File reportFile)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PROPERTY_LEGACY_RELATIVE_PATH_ENABLED

        @Deprecated
        public static final java.lang.String PROPERTY_LEGACY_RELATIVE_PATH_ENABLED
        Deprecated.
        The property should only be set when upgrading from a version older than 6.6.0 with a repository that relied on the fact that paths were relative to the master report. The property might be removed at some point in the future.
        Property that determines whether resource paths in subreports, style templates and data adapters should be interpreted as relative to the master report location.
        Starting with version 6.6.0, relative paths in subreports, style templates and data adapters are resolved as relative to the resource that contains them. Prior to version 6.6.0, relative paths in subreports, style templates and data adapters were resolved as relative to the master report resource. This property can be set to true to restore the pre 6.6.0 functionality.
        The default value of the property is false.
        See Also:
        Constant Field Values
    • Method Detail

      • fillToFile

        public java.lang.String fillToFile​(java.lang.String sourceFileName,
                                           java.util.Map<java.lang.String,​java.lang.Object> params,
                                           java.sql.Connection connection)
                                    throws JRException
        Fills the compiled report design loaded from the specified file. The result of this operation is another file that will contain the serialized JasperPrint object representing the generated document, having the same name as the report design as declared in the source file, plus the *.jrprint extension, located in the same directory as the source file.
        Parameters:
        sourceFileName - source file containing the compiled report design
        params - report parameters map
        connection - JDBC connection object to use for executing the report internal SQL query
        Throws:
        JRException
      • fillToFile

        public java.lang.String fillToFile​(java.lang.String sourceFileName,
                                           java.util.Map<java.lang.String,​java.lang.Object> params)
                                    throws JRException
        Fills the compiled report design loaded from the specified file. The result of this operation is another file that will contain the serialized JasperPrint object representing the generated document, having the same name as the report design as declared in the source file, plus the *.jrprint extension, located in the same directory as the source file.
        Parameters:
        sourceFileName - source file containing the compiled report design
        params - report parameters map
        Throws:
        JRException
        See Also:
        JRFiller.fill(JasperReportsContext, JasperReport, Map)
      • fillToFile

        public void fillToFile​(java.lang.String sourceFileName,
                               java.lang.String destFileName,
                               java.util.Map<java.lang.String,​java.lang.Object> params,
                               java.sql.Connection connection)
                        throws JRException
        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.
        Parameters:
        sourceFileName - source file containing the compiled report design
        destFileName - file name to place the generated report into
        params - report parameters map
        connection - JDBC connection object to use for executing the report internal SQL query
        Throws:
        JRException
      • fillToFile

        public void fillToFile​(java.lang.String sourceFileName,
                               java.lang.String destFileName,
                               java.util.Map<java.lang.String,​java.lang.Object> params)
                        throws JRException
        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.
        Parameters:
        sourceFileName - source file containing the compiled report design
        destFileName - file name to place the generated report into
        params - report parameters map
        Throws:
        JRException
        See Also:
        JRFiller.fill(JasperReportsContext, JasperReport, Map)
      • fillToFile

        public void fillToFile​(JasperReport jasperReport,
                               java.lang.String destFileName,
                               java.util.Map<java.lang.String,​java.lang.Object> parameters,
                               java.sql.Connection connection)
                        throws JRException
        Fills the compiled report design received as the first parameter and places the result in the file specified by the second parameter.
        Parameters:
        jasperReport - compiled report design object to use for filling
        destFileName - file name to place the generated report into
        parameters - report parameters map
        connection - JDBC connection object to use for executing the report internal SQL query
        Throws:
        JRException
      • fillToFile

        public void fillToFile​(JasperReport jasperReport,
                               java.lang.String destFileName,
                               java.util.Map<java.lang.String,​java.lang.Object> parameters)
                        throws JRException
        Fills the compiled report design received as the first parameter and places the result in the file specified by the second parameter.
        Parameters:
        jasperReport - compiled report design object to use for filling
        destFileName - file name to place the generated report into
        parameters - report parameters map
        Throws:
        JRException
        See Also:
        JRFiller.fill(JasperReportsContext, JasperReport, Map)
      • fill

        public JasperPrint fill​(java.lang.String sourceFileName,
                                java.util.Map<java.lang.String,​java.lang.Object> params,
                                java.sql.Connection connection)
                         throws JRException
        Fills the compiled report design loaded from the specified file and returns the generated report object.
        Parameters:
        sourceFileName - source file containing the compiled report design
        params - report parameters map
        connection - JDBC connection object to use for executing the report internal SQL query
        Returns:
        generated report object
        Throws:
        JRException
      • fillFromRepo

        public JasperPrint fillFromRepo​(java.lang.String reportLocation,
                                        java.util.Map<java.lang.String,​java.lang.Object> params,
                                        java.sql.Connection connection)
                                 throws JRException
        Fills the compiled report design loaded from the specified file and returns the generated report object.
        Parameters:
        reportLocation - the repository location of the compiled report
        params - report parameters map
        connection - JDBC connection object to use for executing the report internal SQL query
        Returns:
        generated report object
        Throws:
        JRException
      • fill

        public JasperPrint fill​(java.lang.String sourceFileName,
                                java.util.Map<java.lang.String,​java.lang.Object> params)
                         throws JRException
        Fills the compiled report design loaded from the specified file and returns the generated report object.
        Parameters:
        sourceFileName - source file containing the compiled report design
        params - report parameters map
        Returns:
        generated report object
        Throws:
        JRException
        See Also:
        JRFiller.fill(JasperReportsContext, JasperReport, Map)
      • fillFromRepo

        public JasperPrint fillFromRepo​(java.lang.String reportLocation,
                                        java.util.Map<java.lang.String,​java.lang.Object> params)
                                 throws JRException
        Fills the compiled report design loaded from the specified file and returns the generated report object.
        Parameters:
        reportLocation - the repository location of the compiled report
        params - report parameters map
        Returns:
        generated report object
        Throws:
        JRException
        See Also:
        JRFiller.fill(JasperReportsContext, JasperReport, Map)
      • fillToStream

        public void fillToStream​(java.io.InputStream inputStream,
                                 java.io.OutputStream outputStream,
                                 java.util.Map<java.lang.String,​java.lang.Object> parameters,
                                 java.sql.Connection connection)
                          throws JRException
        Fills the compiled report design loaded from the supplied input stream and writes the generated report object to the output stream specified by the second parameter.
        Parameters:
        inputStream - input stream to read the compiled report design object from
        outputStream - output stream to write the generated report object to
        parameters - report parameters map
        connection - JDBC connection object to use for executing the report internal SQL query
        Throws:
        JRException
      • fillToStream

        public void fillToStream​(java.io.InputStream inputStream,
                                 java.io.OutputStream outputStream,
                                 java.util.Map<java.lang.String,​java.lang.Object> parameters)
                          throws JRException
        Fills the compiled report design loaded from the supplied input stream and writes the generated report object to the output stream specified by the second parameter.
        Parameters:
        inputStream - input stream to read the compiled report design object from
        outputStream - output stream to write the generated report object to
        parameters - report parameters map
        Throws:
        JRException
        See Also:
        JRFiller.fill(JasperReportsContext, JasperReport, Map)
      • fillToStream

        public void fillToStream​(JasperReport jasperReport,
                                 java.io.OutputStream outputStream,
                                 java.util.Map<java.lang.String,​java.lang.Object> parameters,
                                 java.sql.Connection connection)
                          throws JRException
        Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter.
        Parameters:
        jasperReport - compiled report design object to use for filling
        outputStream - output stream to write the generated report object to
        parameters - report parameters map
        connection - JDBC connection object to use for executing the report internal SQL query
        Throws:
        JRException
      • fillToStream

        public void fillToStream​(JasperReport jasperReport,
                                 java.io.OutputStream outputStream,
                                 java.util.Map<java.lang.String,​java.lang.Object> parameters)
                          throws JRException
        Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter.
        Parameters:
        jasperReport - compiled report design object to use for filling
        outputStream - output stream to write the generated report object to
        parameters - report parameters map
        Throws:
        JRException
        See Also:
        JRFiller.fill(JasperReportsContext, JasperReport, Map)
      • fill

        public JasperPrint fill​(java.io.InputStream inputStream,
                                java.util.Map<java.lang.String,​java.lang.Object> parameters,
                                java.sql.Connection connection)
                         throws JRException
        Fills the compiled report design loaded from the supplied input stream and returns the generated report object.
        Parameters:
        inputStream - input stream to read the compiled report design object from
        parameters - report parameters map
        connection - JDBC connection object to use for executing the report internal SQL query
        Returns:
        generated report object
        Throws:
        JRException
      • fill

        public JasperPrint fill​(java.io.InputStream inputStream,
                                java.util.Map<java.lang.String,​java.lang.Object> parameters)
                         throws JRException
        Fills the compiled report design loaded from the supplied input stream and returns the generated report object.
        Parameters:
        inputStream - input stream to read the compiled report design object from
        parameters - report parameters map
        Returns:
        generated report object
        Throws:
        JRException
        See Also:
        JRFiller.fill(JasperReportsContext, JasperReport, Map)
      • fill

        public JasperPrint fill​(JasperReport jasperReport,
                                java.util.Map<java.lang.String,​java.lang.Object> parameters,
                                java.sql.Connection connection)
                         throws JRException
        Fills the compiled report design supplied as the first parameter and returns the generated report object.
        Parameters:
        jasperReport - compiled report design object to use for filling
        parameters - report parameters map
        connection - JDBC connection object to use for executing the report internal SQL query
        Returns:
        generated report object
        Throws:
        JRException
      • fillToFile

        public java.lang.String fillToFile​(java.lang.String sourceFileName,
                                           java.util.Map<java.lang.String,​java.lang.Object> params,
                                           JRDataSource dataSource)
                                    throws JRException
        Fills the compiled report design loaded from the specified file. The result of this operation is another file that will contain the serialized JasperPrint object representing the generated document, having the same name as the report design as declared in the source file, plus the *.jrprint extension, located in the same directory as the source file.
        Parameters:
        sourceFileName - source file containing the compiled report design
        params - report parameters map
        dataSource - data source object
        Throws:
        JRException
      • fillToFile

        public void fillToFile​(java.lang.String sourceFileName,
                               java.lang.String destFileName,
                               java.util.Map<java.lang.String,​java.lang.Object> params,
                               JRDataSource dataSource)
                        throws JRException
        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.
        Parameters:
        sourceFileName - source file containing the compiled report design
        destFileName - file name to place the generated report into
        params - report parameters map
        dataSource - data source object
        Throws:
        JRException
      • fillToFile

        public void fillToFile​(JasperReport jasperReport,
                               java.lang.String destFileName,
                               java.util.Map<java.lang.String,​java.lang.Object> parameters,
                               JRDataSource dataSource)
                        throws JRException
        Fills the compiled report design received as the first parameter and places the result in the file specified by the second parameter.
        Parameters:
        jasperReport - compiled report design object to use for filling
        destFileName - file name to place the generated report into
        parameters - report parameters map
        dataSource - data source object
        Throws:
        JRException
      • fill

        public JasperPrint fill​(java.lang.String sourceFileName,
                                java.util.Map<java.lang.String,​java.lang.Object> params,
                                JRDataSource dataSource)
                         throws JRException
        Fills the compiled report design loaded from the specified file and returns the generated report object.
        Parameters:
        sourceFileName - source file containing the compiled report design
        params - report parameters map
        dataSource - data source object
        Returns:
        generated report object
        Throws:
        JRException
      • fillFromRepo

        public JasperPrint fillFromRepo​(java.lang.String reportLocation,
                                        java.util.Map<java.lang.String,​java.lang.Object> params,
                                        JRDataSource dataSource)
                                 throws JRException
        Fills the compiled report design loaded from the specified file and returns the generated report object.
        Parameters:
        reportLocation - the repository location of the compiled report
        params - report parameters map
        dataSource - data source object
        Returns:
        generated report object
        Throws:
        JRException
      • fillToStream

        public void fillToStream​(java.io.InputStream inputStream,
                                 java.io.OutputStream outputStream,
                                 java.util.Map<java.lang.String,​java.lang.Object> parameters,
                                 JRDataSource dataSource)
                          throws JRException
        Fills the compiled report design loaded from the supplied input stream and writes the generated report object to the output stream specified by the second parameter.
        Parameters:
        inputStream - input stream to read the compiled report design object from
        outputStream - output stream to write the generated report object to
        parameters - report parameters map
        dataSource - data source object
        Throws:
        JRException
      • fillToStream

        public void fillToStream​(JasperReport jasperReport,
                                 java.io.OutputStream outputStream,
                                 java.util.Map<java.lang.String,​java.lang.Object> parameters,
                                 JRDataSource dataSource)
                          throws JRException
        Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter.
        Parameters:
        jasperReport - compiled report design object to use for filling
        outputStream - output stream to write the generated report object to
        parameters - report parameters map
        dataSource - data source object
        Throws:
        JRException
      • fill

        public JasperPrint fill​(java.io.InputStream inputStream,
                                java.util.Map<java.lang.String,​java.lang.Object> parameters,
                                JRDataSource dataSource)
                         throws JRException
        Fills the compiled report design loaded from the supplied input stream and returns the generated report object.
        Parameters:
        inputStream - input stream to read the compiled report design object from
        parameters - report parameters map
        dataSource - data source object
        Returns:
        generated report object
        Throws:
        JRException
      • fill

        public JasperPrint fill​(JasperReport jasperReport,
                                java.util.Map<java.lang.String,​java.lang.Object> parameters,
                                JRDataSource dataSource)
                         throws JRException
        Fills the compiled report design supplied as the first parameter and returns the generated report object.
        Parameters:
        jasperReport - compiled report design object to use for filling
        parameters - report parameters map
        dataSource - data source object
        Returns:
        generated report object
        Throws:
        JRException
      • fillReportToFile

        public static java.lang.String fillReportToFile​(java.lang.String sourceFileName,
                                                        java.util.Map<java.lang.String,​java.lang.Object> params)
                                                 throws JRException
        Throws:
        JRException
        See Also:
        fillToFile(String, Map)
      • fillReportToFile

        public static void fillReportToFile​(java.lang.String sourceFileName,
                                            java.lang.String destFileName,
                                            java.util.Map<java.lang.String,​java.lang.Object> params)
                                     throws JRException
        Throws:
        JRException
        See Also:
        fillToFile(String, String, Map)