de.vc.jfo.report

## Class FOReportBuilder

- java.lang.Object
- - de.vc.report.ReportBuilder
  - - de.vc.jfo.report.FOReportBuilder

-     public class FOReportBuilder
      extends ReportBuilder

  The FO report builder creates XSL-FO reports which can be transformed directly to another output format (e.g. PDF) using a XSL-FO renderer (FOP, XEP...).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FOReportBuilder(byte[] rtfTemplate)` Creates a new report builder.
    `FOReportBuilder(byte[] rtfTemplate, ImportParameters params)` Creates a new report builder.
    `FOReportBuilder(java.lang.String rtfTemplate)` Creates new report builder.
    `FOReportBuilder(java.lang.String rtfTemplate, ImportParameters params)` Creates new report builder.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Report` | `buildReport(ReportData data, ReportContext metaData)` Creates a FO report.
    `protected void` | `dispose()` Releases all resources after building reports.
    `boolean` | `isHighlightUnpopulatedFields()` Checks whether unpopulated fields are highlighted (displayed in red color and underlined).
    `void` | `setHighlightUnpopulatedFields(boolean highlightUnpopulatedFields)` Sets whether unpopulated fields are highlighted (displayed in red color and underlined).
    `void` | `setImportParameters(ImportParameters importParams)` Sets the import parameters that are used for processing RTF to XSL-FO.
    `void` | `setOutputFormat(OutputFormat outputFormat)` Sets the output-format of reports.
    `void` | `setOutputFormat(OutputFormat outputFormat, Renderer renderer)` Sets the output-format of reports.
    `void` | `setRTF2FOConfig(RTF2FOConfig rtf2foConfig)` Sets the configuration that is used for processing RTF to XSL-FO.

    - ### Methods inherited from class de.vc.report.ReportBuilder

      `finish, getLogger, init`

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

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

- - ### Constructor Detail

    - #### FOReportBuilder

          public FOReportBuilder(java.lang.String rtfTemplate)
                          throws java.io.FileNotFoundException

      Creates new report builder.
      Parameters:
        `rtfTemplate` - RTF template file.
      Throws:
        `java.io.FileNotFoundException` - Is thrown if RTF template file is not found.

    - #### FOReportBuilder

          public FOReportBuilder(java.lang.String rtfTemplate,
                         ImportParameters params)
                          throws java.io.FileNotFoundException

      Creates new report builder.
      Parameters:
        `rtfTemplate` - RTF template file.
        `params` - Import parameters used for RTF import.
      Throws:
        `java.io.FileNotFoundException` - Is thrown if RTF template file is not found.

    - #### FOReportBuilder

          public FOReportBuilder(byte[] rtfTemplate)

      Creates a new report builder.
      Parameters:
        `rtfTemplate` - RTF template in a byte array.

    - #### FOReportBuilder

          public FOReportBuilder(byte[] rtfTemplate,
                         ImportParameters params)

      Creates a new report builder.
      Parameters:
        `rtfTemplate` - RTF template in a byte array.
        `params` - Import parameters used for RTF import.

  - ### Method Detail

    - #### setOutputFormat

          public void setOutputFormat(OutputFormat outputFormat,
                             Renderer renderer)

      Sets the output-format of reports.
      Parameters:
        `outputFormat` - Output format.
        `renderer` - Render that can render into output format.

    - #### setOutputFormat

          public void setOutputFormat(OutputFormat outputFormat)

      Sets the output-format of reports.
      Parameters:
        `outputFormat` - Output format.
      Throws:
        `java.lang.IllegalArgumentException` - is thrown if no renderer is available for `outputFormat`

    - #### isHighlightUnpopulatedFields

          public boolean isHighlightUnpopulatedFields()

      Checks whether unpopulated fields are highlighted (displayed in red color and underlined). A field is unpopulated if no value (also null-values are values) was assigned to the keyword.
      Note: Highlighting is only available for FILLIN and MERGEFIELD fields.
      Returns:
        true if highlighting is enabled (defaults to false).

    - #### setHighlightUnpopulatedFields

          public void setHighlightUnpopulatedFields(boolean highlightUnpopulatedFields)

      Sets whether unpopulated fields are highlighted (displayed in red color and underlined). A field is unpopulated if no value (also null-values are values) was assigned to a keyword.
      Note: Highlighting is only available for FILLIN and MERGEFIELD fields.
      Parameters:
        `highlightUnpopulatedFields` - true to enable highlighting.

    - #### setRTF2FOConfig

          public void setRTF2FOConfig(RTF2FOConfig rtf2foConfig)

      Sets the configuration that is used for processing RTF to XSL-FO. This configuration overrides the default RTF to XSL-FO configuration of the JFOConfig object (singleton).
      Parameters:
        `rtf2foConfig` - RTF2FOConfig
      See Also:
        `RTF2FOConfig`, `JFOConfig`

    - #### setImportParameters

          public void setImportParameters(ImportParameters importParams)

      Sets the import parameters that are used for processing RTF to XSL-FO.
      Parameters:
        `importParams` - ImportParameters

    - #### buildReport

          protected final Report buildReport(ReportData data,
                           ReportContext metaData)
                                      throws ReportException

      Creates a FO report.
      Specified by:
        `buildReport` in class `ReportBuilder`
      Parameters:
        `data` - ReportData
        `metaData` - ReportContext
      Returns:
        Report of type de.vc.jfo.report.FOReport
      Throws:
        `ReportException`
      See Also:
        `FOReport`

    - #### dispose

          protected void dispose()

      Releases all resources after building reports.

© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.