use of org.pentaho.reporting.engine.classic.core.modules.output.xml.XMLProcessor in project pentaho-platform by pentaho.
the class JFreeReportComponent method writeXml.
protected boolean writeXml(final MasterReport report, final OutputStream outputStream) {
boolean result = false;
try {
final XMLProcessor processor = new XMLProcessor(report);
final OutputStreamWriter writer = new OutputStreamWriter(outputStream);
processor.setWriter(writer);
processor.processReport();
writer.close();
result = true;
} catch (ReportProcessingException e) {
// $NON-NLS-1$
error(Messages.getInstance().getString("JFreeReportXmlComponent.ERROR_0046_FAILED_TO_PROCESS_REPORT"), e);
} catch (IOException e) {
// $NON-NLS-1$
error(Messages.getInstance().getString("JFreeReportXmlComponent.ERROR_0046_FAILED_TO_PROCESS_REPORT"), e);
}
return result;
}
use of org.pentaho.reporting.engine.classic.core.modules.output.xml.XMLProcessor in project pentaho-platform by pentaho.
the class JFreeReportXmlComponent method performExport.
@SuppressWarnings("deprecation")
@Override
protected boolean performExport(final MasterReport report, final OutputStream outputStream) {
try {
final XMLProcessor processor = new XMLProcessor(report);
final OutputStreamWriter writer = new OutputStreamWriter(outputStream);
processor.setWriter(writer);
processor.processReport();
writer.close();
close();
return true;
} catch (ReportProcessingException e) {
// $NON-NLS-1$
error(Messages.getInstance().getString("JFreeReportXmlComponent.ERROR_0046_FAILED_TO_PROCESS_REPORT"), e);
return false;
} catch (IOException e) {
// $NON-NLS-1$
error(Messages.getInstance().getString("JFreeReportXmlComponent.ERROR_0046_FAILED_TO_PROCESS_REPORT"), e);
return false;
}
}
Aggregations