Class ReportWriter


  • public class ReportWriter
    extends ReportWriterContext
    A report writer.
    Author:
    Thomas Morgner
    • Constructor Detail

      • ReportWriter

        public ReportWriter​(MasterReport report,
                            String encoding,
                            org.pentaho.reporting.libraries.base.config.Configuration config)
        Creates a new report writer for a report.
        Parameters:
        report - the report.
        encoding - the encoding.
        config - the write configuration.
    • Method Detail

      • createDefaultConfiguration

        public static org.pentaho.reporting.libraries.base.config.Configuration createDefaultConfiguration​(MasterReport report)
        Builds a default configuration from a given report definition object.

        This will only create a valid definition, if the report has a valid content base object set.

        Parameters:
        report - the report for which to create the writer configuration.
        Returns:
        the generated configuration.
      • getEncoding

        public String getEncoding()
        Returns the encoding.
        Returns:
        The encoding.
      • addDataSourceFactory

        public void addDataSourceFactory​(DataSourceFactory dsf)
        Adds a data-source factory.
        Parameters:
        dsf - the data-source factory.
      • addElementFactory

        public void addElementFactory​(ElementFactory ef)
        Adds an element factory.
        Parameters:
        ef - the element factory.
      • addClassFactoryFactory

        public void addClassFactoryFactory​(ClassFactory cf)
        Adds a class factory.
        Parameters:
        cf - the class factory.
      • addStyleKeyFactory

        public void addStyleKeyFactory​(StyleKeyFactory skf)
        Adds a style-key factory.
        Parameters:
        skf - the style-key factory.
      • addTemplateCollection

        public void addTemplateCollection​(TemplateCollection collection)
        Adds a template collection.
        Parameters:
        collection - the template collection.
      • getConfiguration

        public org.pentaho.reporting.libraries.base.config.Configuration getConfiguration()
        Returns the configuration used to write the report.
        Returns:
        the writer configuration.