protected ReportProcessor createReportProcessor( OutputStream fout ) throws Exception { StreamRTFOutputProcessor target = new StreamRTFOutputProcessor( report.getConfiguration(), fout, report.getResourceManager() ); return new StreamReportProcessor( report, target ); } };
public void render() throws Exception { createReport(); ClassLoader originalClassloader = Thread.currentThread().getContextClassLoader(); try { // we need to change the current classloader for the reporting to find our plugin classes Thread.currentThread().setContextClassLoader( KettleReportBuilder.class.getClassLoader() ); switch ( options.getOutputType() ) { case PDF: PdfReportUtil.createPDF( report, targetFilename ); break; case DOC: RTFReportUtil.createRTF( report, targetFilename ); break; case XLS: ExcelReportUtil.createXLS( report, targetFilename ); break; case HTML: HtmlReportUtil.createDirectoryHTML( report, targetFilename ); break; case CSV: CSVReportUtil.createCSV( report, targetFilename ); break; default: break; } } finally { Thread.currentThread().setContextClassLoader( originalClassloader ); } }
/** * DefaultConstructor. Loads the module specification. * * @throws ModuleInitializeException * if an error occured. */ public RTFTableModule() throws ModuleInitializeException { loadModuleInfo(); }
if ( isValid() == false ) { setError( new ReportProcessingException( "Error: The task is not configured properly." ) ); return; setError( null ); try { final MasterReport masterReport = getReport(); final Configuration configuration = masterReport.getConfiguration(); final ContentLocation contentLocation = getBodyContentLocation(); final NameGenerator nameGenerator = getBodyNameGenerator(); final ContentItem contentItem = contentLocation.createItem( nameGenerator.generateName( null, "application/rtf" ) ); new StreamRTFOutputProcessor( configuration, outputStream, masterReport.getResourceManager() ); final StreamReportProcessor streamReportProcessor = new StreamReportProcessor( masterReport, outputProcessor ); try { final ReportProgressListener[] progressListeners = getReportProgressListeners(); for ( int i = 0; i < progressListeners.length; i++ ) { final ReportProgressListener listener = progressListeners[i]; setError( e );
if ( isValid() == false ) { setError( new ReportProcessingException( "Error: The task is not configured properly." ) ); return; setError( null ); try { final MasterReport masterReport = getReport(); final Configuration configuration = masterReport.getConfiguration(); final ContentLocation contentLocation = getBodyContentLocation(); final NameGenerator nameGenerator = getBodyNameGenerator(); final ContentItem contentItem = contentLocation.createItem( nameGenerator.generateName( null, "application/rtf" ) ); new FlowRTFOutputProcessor( configuration, outputStream, masterReport.getResourceManager() ); final FlowReportProcessor streamReportProcessor = new FlowReportProcessor( masterReport, outputProcessor ); try { final ReportProgressListener[] progressListeners = getReportProgressListeners(); for ( int i = 0; i < progressListeners.length; i++ ) { final ReportProgressListener listener = progressListeners[i]; setError( e );
protected void processingContentFinished() { if ( isContentGeneratable() == false ) { return; } this.printer.close(); this.metaData.commit(); } }
protected void processingContentFinished() { if ( isContentGeneratable() == false ) { return; } this.printer.close(); this.metaData.commit(); }
createRTF( report, fout ); fout.close(); fout = null;
public static void createRTF( final MasterReport report, final OutputStream outputStream ) throws ReportProcessingException { if ( report == null ) { throw new NullPointerException(); } if ( outputStream == null ) { throw new NullPointerException(); } final StreamRTFOutputProcessor target = new StreamRTFOutputProcessor( report.getConfiguration(), outputStream, report.getResourceManager() ); final StreamReportProcessor proc = new StreamReportProcessor( report, target ); proc.processReport(); proc.close(); } }
public static void createRTF( final MasterReport report ) throws Exception { try { RTFReportUtil.createRTF( report, new NullOutputStream() ); } catch ( IndexOutOfBoundsException ibe ) { // this is a known iText bug that does not get fixed. } catch ( ReportParameterValidationException p ) { // reports that have mandatory parameters are ok to fail. Assert.fail(); } }
new StreamRTFOutputProcessor( report.getConfiguration(), out, report.getResourceManager() ); final StreamReportProcessor proc = new StreamReportProcessor( report, target ); if ( progressDialog != null ) {