@Test
 public void testComplexCrosstab() throws ResourceException, ReportProcessingException {
   final MasterReport report = DebugReportRunner.parseGoldenSampleReport("Prd-4523.prpt");
   report
       .getReportConfiguration()
       .setConfigProperty(
           "org.pentaho.reporting.engine.classic.core.modules.output.table.base.FailOnCellConflicts",
           "true");
   HtmlReportUtil.createStreamHTML(report, new NullOutputStream());
 }
  /**
   * The starting point for the application.
   *
   * @param args ignored.
   */
  public static void main(final String[] args) {
    ClassicEngineBoot.getInstance().start();
    final ReportGenerator gen = ReportGenerator.getInstance();
    final URL reportURL =
        ObjectUtilities.getResourceRelative(REFERENCE_REPORT, StyleKeyReferenceGenerator.class);
    if (reportURL == null) {
      System.err.println("The report was not found in the classpath"); // $NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); // $NON-NLS-1$
      System.exit(1);
      return;
    }

    final MasterReport report;
    try {
      report = gen.parseReport(reportURL);
    } catch (Exception e) {
      System.err.println("The report could not be parsed."); // $NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); // $NON-NLS-1$
      e.printStackTrace(System.err);
      System.exit(1);
      return;
    }
    report.setDataFactory(new TableDataFactory("default", createData())); // $NON-NLS-1$
    try {
      HtmlReportUtil.createStreamHTML(
          report,
          System.getProperty("user.home") // $NON-NLS-1$
              + "/stylekey-reference.html"); //$NON-NLS-1$
      PdfReportUtil.createPDF(
          report,
          System.getProperty("user.home") // $NON-NLS-1$
              + "/stylekey-reference.pdf"); //$NON-NLS-1$
    } catch (Exception e) {
      System.err.println("The report processing failed."); // $NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); // $NON-NLS-1$
      e.printStackTrace(System.err);
      System.exit(1);
    }
  }
 /**
  * Saves a report into a single HTML format.
  *
  * @param report the report.
  * @param filename target file name.
  * @throws Exception if an error occurs.
  */
 public static void createStreamHTML(final MasterReport report, final String filename)
     throws Exception {
   HtmlReportUtil.createStreamHTML(report, filename);
 }