org.pentaho.reporting.engine.classic.core.modules.output.csv
Class CSVDataReportUtil

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.modules.output.csv.CSVDataReportUtil

public final class CSVDataReportUtil
extends Object

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

Author:
Thomas Morgner

Method Summary
static void createCSV(MasterReport report, OutputStream outputStream, String encoding)
           
static void createCSV(MasterReport report, String filename)
          Saves a report to CSV format.
static void createCSV(MasterReport report, String filename, String encoding)
          Saves a report to CSV format.
static void createCSV(MasterReport report, Writer writer)
          Saves a report to CSV format.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createCSV

public static void createCSV(MasterReport report,
                             Writer writer)
                      throws ReportProcessingException
Saves a report to CSV format.

Parameters:
report - the report.
writer - the writer
Throws:
ReportProcessingException - if the report processing failed.

createCSV

public static void createCSV(MasterReport report,
                             String filename)
                      throws ReportProcessingException,
                             IOException
Saves a report to CSV 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.

createCSV

public static void createCSV(MasterReport report,
                             String filename,
                             String encoding)
                      throws ReportProcessingException,
                             IOException
Saves a report to CSV format.

Parameters:
report - the report.
filename - target file name.
encoding - the encoding that should be used.
Throws:
ReportProcessingException - if the report processing failed.
IOException - if there was an IOerror while processing the report.

createCSV

public static void createCSV(MasterReport report,
                             OutputStream outputStream,
                             String encoding)
                      throws ReportProcessingException,
                             IOException
Throws:
ReportProcessingException
IOException