Class HtmlReportUtil


  • public final class HtmlReportUtil
    extends Object
    Utility class to provide an easy to use default implementation of html exports.
    Author:
    Thomas Morgner
    • Method Detail

      • createDirectoryHTML

        public static void createDirectoryHTML​(MasterReport report,
                                               String targetFileName)
                                        throws IOException,
                                               ReportProcessingException
        Saves a report to HTML. The HTML file is stored in a directory; all other content goes into the same directory as the specified html file. The parent directories for both the TargetFilename and the DataDirectoryName will be created if necessary.

        When exporting a report with manual pagebreaks, the directory of the target-filename will contain more than one result-HTML files after the export is complete.

        Parameters:
        report - the report.
        targetFileName - target file name.
        Throws:
        ReportProcessingException - if the report processing failed.
        IOException - if there was an IOerror while processing the report.
      • createDirectoryHTML

        public static void createDirectoryHTML​(MasterReport report,
                                               String targetFileName,
                                               String dataDirectoryName)
                                        throws IOException,
                                               ReportProcessingException
        Saves a report to HTML. The HTML file is stored in a directory; all other content goes into the same directory as the specified html file. The parent directories for both the TargetFilename and the DataDirectoryName will be created if necessary.

        When exporting a report with manual pagebreaks, the directory of the target-filename will contain more than one result-HTML files after the export is complete.

        Parameters:
        report - the report.
        targetFileName - target file name.
        Throws:
        ReportProcessingException - if the report processing failed.
        IOException - if there was an IOerror while processing the report.
      • createZIPHTML

        public static void createZIPHTML​(MasterReport report,
                                         String filename)
                                  throws IOException,
                                         ReportProcessingException
        Saves a report in a ZIP file. The zip file contains a HTML document. The directory that contains the specified filename must be created before this method is called.
        Parameters:
        report - the report.
        filename - target file name.
        Throws:
        ReportProcessingException - if the report processing failed.
        IOException - if there was an IOerror while processing the report.
      • createZIPHTML

        public static void createZIPHTML​(MasterReport report,
                                         OutputStream out,
                                         String filename)
                                  throws IOException,
                                         ReportProcessingException
        Saves a report in a ZIP file. The zip file contains a HTML document. The directory that contains the specified filename must be created before this method is called.
        Parameters:
        report - the report.
        filename - target file name.
        Throws:
        ReportProcessingException - if the report processing failed.
        IOException - if there was an IOerror while processing the report.