org.pentaho.reporting.engine.classic.core.modules.output.table.html
Class HtmlReportUtil

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.modules.output.table.html.HtmlReportUtil

public final class HtmlReportUtil
extends Object

Utility class to provide an easy to use default implementation of html exports.

Author:
Thomas Morgner

Method Summary
static void createDirectoryHTML(MasterReport report, String targetFileName)
          Saves a report to HTML.
static void createDirectoryHTML(MasterReport report, String targetFileName, String dataDirectoryName)
          Saves a report to HTML.
static void createStreamHTML(MasterReport report, OutputStream outputStream)
           
static void createStreamHTML(MasterReport report, String filename)
          Saves a report into a single HTML format.
static void createZIPHTML(MasterReport report, OutputStream out, String filename)
          Saves a report in a ZIP file.
static void createZIPHTML(MasterReport report, String filename)
          Saves a report in a ZIP file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createStreamHTML

public static void createStreamHTML(MasterReport report,
                                    String filename)
                             throws IOException,
                                    ReportProcessingException
Saves a report into a single HTML format.

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.

createStreamHTML

public static void createStreamHTML(MasterReport report,
                                    OutputStream outputStream)
                             throws ReportProcessingException
Throws:
ReportProcessingException

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.