net.sf.jasperreports.engine

## Class JasperReport

- java.lang.Object
- - net.sf.jasperreports.engine.base.JRBaseReport
  - - net.sf.jasperreports.engine.JasperReport

- All Implemented Interfaces:
    java.io.Serializable, JRChangeEventsSupport, JRDefaultStyleProvider, JRIdentifiable, JRPropertiesHolder, JRReport
  Direct Known Subclasses:
    TableJasperReport

      public class JasperReport
      extends JRBaseReport

  Instances of this class represent compiled report template objects. They are obtained only through the JasperReports report compilation process and are ready to use for filling with data and report generation.

  Through compilation, along with various consistency checks and rearrangements of the report elements for more rapid performance in the application, the library creates an on-the-fly class file (or a script, depending on the type of the report compiler used) containing all the report expressions (such as report variables expressions, text field and image expressions, and group expressions). This class or script is used to evaluate report expressions during the report-filling process at runtime.

  The main difference between a compiled report and a report design is that reports are already compiled and validated, so many characteristics are read only.

  Version:
    $Id: JasperReport.java 7025 2014-04-17 07:55:02Z shertage $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class net.sf.jasperreports.engine.base.JRBaseReport

      `background, bottomMargin, columnCount, columnDirection, columnFooter, columnHeader, columnSpacing, columnWidth, datasets, defaultStyle, detailSection, formatFactoryClass, ignorePagination, importsSet, isFloatColumnFooter, isSummaryNewPage, isSummaryWithPageHeaderAndFooter, isTitleNewPage, language, lastPageFooter, leftMargin, mainDataset, name, noData, orientationValue, pageFooter, pageHeader, pageHeight, pageWidth, printOrderValue, PROPERTY_WHEN_NO_DATA_TYPE, rightMargin, styles, summary, templates, title, topMargin, whenNoDataTypeValue`

    - ### Fields inherited from interface net.sf.jasperreports.engine.JRReport

      `LANGUAGE_GROOVY, LANGUAGE_JAVA`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JasperReport(JRReport report, java.lang.String compilerClass, java.io.Serializable compileData, JRBaseObjectFactory factory, java.lang.String compileNameSuffix)`
    `JasperReport(JRReport report, java.lang.String compilerClass, java.io.Serializable compileData, JRExpressionCollector expressionCollector, java.lang.String compileNameSuffix)` Constructs a report by specifying the template report and compile information.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.io.Serializable` | `getCompileData()` Returns data resulted from the expression evaluators compilation.
    `java.lang.String` | `getCompileNameSuffix()` Returns the suffix of the class/unit names generated at report compilation.
    `java.lang.String` | `getCompilerClass()` Returns the name of the compiler class used to compile this report.

    - ### Methods inherited from class net.sf.jasperreports.engine.base.JRBaseReport

      `copyTemplates, getAllBands, getBackground, getBottomMargin, getColumnCount, getColumnDirection, getColumnFooter, getColumnHeader, getColumnSpacing, getColumnWidth, getDatasets, getDefaultStyle, getDetailSection, getEventSupport, getFields, getFormatFactoryClass, getGroups, getImports, getLanguage, getLastPageFooter, getLeftMargin, getMainDataset, getName, getNoData, getOrientationValue, getPageFooter, getPageHeader, getPageHeight, getPageWidth, getParameters, getParentProperties, getPrintOrderValue, getPropertiesMap, getProperty, getPropertyNames, getQuery, getResourceBundle, getRightMargin, getScriptletClass, getScriptlets, getSortFields, getStyles, getSummary, getTemplates, getTitle, getTopMargin, getUUID, getVariables, getWhenNoDataTypeValue, getWhenResourceMissingTypeValue, hasProperties, isFloatColumnFooter, isIgnorePagination, isSummaryNewPage, isSummaryWithPageHeaderAndFooter, isTitleNewPage, removeProperty, setProperty, setWhenNoDataType, setWhenResourceMissingType`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JasperReport

          public JasperReport(JRReport report,
                      java.lang.String compilerClass,
                      java.io.Serializable compileData,
                      JRExpressionCollector expressionCollector,
                      java.lang.String compileNameSuffix)

      Constructs a report by specifying the template report and compile information.
      Parameters:
        `report` - the report template
        `compilerClass` - the name of the class used to compile the report
        `compileData` - the report/main dataset compile data
        `expressionCollector` - instance used to collect expressions from the report design
        `compileNameSuffix` - unique string used to distinguish between distinct compilations of reports having the same name

        The collector is used to fetch the generated expression IDs.

    - #### JasperReport

          public JasperReport(JRReport report,
                      java.lang.String compilerClass,
                      java.io.Serializable compileData,
                      JRBaseObjectFactory factory,
                      java.lang.String compileNameSuffix)

  - ### Method Detail

    - #### getCompilerClass

          public java.lang.String getCompilerClass()

      Returns the name of the compiler class used to compile this report.

      The compiler is used to instantiate expression evaluators.

      Returns:
        the name of the compiler class used to compile this report

    - #### getCompileData

          public java.io.Serializable getCompileData()

      Returns data resulted from the expression evaluators compilation.

      This data is used to create expression evaluators for report filling.

      Returns:
        expression evaluators compiled data

    - #### getCompileNameSuffix

          public java.lang.String getCompileNameSuffix()

      Returns the suffix of the class/unit names generated at report compilation.

      This is used to distinguish between disctinct compilations of reports having the same name.

      Returns:
        the suffix of the class/unit names generated at report compilation

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com