Escolar Documentos
Profissional Documentos
Cultura Documentos
User Guide
V 1.1
Author: Maneesh Sethi
Version History
Date
25-Sep2011
03-Oct2011
Version No
1.0
Comments
First version of CSV Emitter Plugin for BIRT
1.1
DELIMITER This render option can be used to specify the text and
field delimiter to be used in the report output.
Default is set to comma.
USAGE - csvOptions.setDelimiter("\t");
import java.util.logging.Level;
import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.report.engine.api.EngineConfig;
import org.eclipse.birt.report.engine.emitter.csv.CSVRenderOption;
import org.eclipse.birt.report.engine.api.IReportEngine;
import org.eclipse.birt.report.engine.api.IReportEngineFactory;
import org.eclipse.birt.report.engine.api.IReportRunnable;
import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
public class RunReport {
public static void runReport() throws Exception {
IReportEngine engine = null;
EngineConfig config = new EngineConfig();
// Your BIRT Runtime Directory Path, don't include ReportEngine in path
name
config.setEngineHome("D:/BIRTRuntime/birt-runtime-3_7_0/");
config.setLogConfig("D:/birt/logs", Level.FINE);
Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(IReportEngineFactory.EXTENSION_
REPORT_ENGINE_FACTORY);
engine = factory.createReportEngine(config);
engine.changeLogLevel(Level.WARNING);
// Your Report Design File Name here..
IReportRunnable design =
engine.openReportDesign("new_report_1.rptdesign");
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
// Creating CSV Render Option object here..
CSVRenderOption csvOptions = new CSVRenderOption();