Skip to main content



      Home
Home » Archived » BIRT » Saving Report Using Birt Viewer
Saving Report Using Birt Viewer [message #44616] Thu, 09 June 2005 06:02 Go to next message
Eclipse UserFriend
Hi,

Is it possible to save the output report HTML/PDF when using the BIRT
viewer?

Can anyone pls help me..

Thanks,
Wins
Re: Saving Report Using Birt Viewer [message #44646 is a reply to message #44616] Thu, 09 June 2005 11:30 Go to previous messageGo to next message
Eclipse UserFriend
check the code:

ReportEngine engine = null;
try {
String reportFile =
"G:\\eclipse\\workspace\\MyReports\\report.rptdesign";
String outputFile = "G:\\eclipse\\workspace\\MyReports\\report.html";

EngineConfig config = new EngineConfig( );

HTMLEmitterConfig hc = new HTMLEmitterConfig();
HTMLCompleteImageHandler imageHandler = new HTMLCompleteImageHandler();
hc.setImageHandler(imageHandler);
config.setEmitterConfiguration(HTMLRenderOption.OUTPUT_FORMA T_HTML, hc);

engine = new ReportEngine(config);

IReportRunnable report = engine.openReportDesign(reportFile);

IRunAndRenderTask task = engine.createRunAndRenderTask(report);
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML) ;
options.setOutputFileName(outputFile);
task.setRenderOption(options);
//task.setParameterValues(params);

task.run( );
} catch (Exception ex) {
ex.printStackTrace();
} finally {
if(engine != null) {
engine.destroy();
}
}


"wins" <winstonguadiz@yahoo.com> wrote in message
news:950bfcf7334e2d27a4663e472f07ad35$1@www.eclipse.org...
> Hi,
>
> Is it possible to save the output report HTML/PDF when using the BIRT
> viewer?
>
> Can anyone pls help me..
>
> Thanks,
> Wins
>
>
>
Re: Saving Report Using Birt Viewer [message #44774 is a reply to message #44616] Thu, 09 June 2005 16:08 Go to previous message
Eclipse UserFriend
win,

When viewing report in html format, generated report is put in an iframe.
You have to use browser view source/save page function to get generated
html file.

When viewing report in pdf format, you can use acrobat viewer's save
function.

Viewer does not have "report download and save" feature in this release.

Jun Zhai
Previous Topic:Header/Footer disappears in pdf/html
Next Topic:Aceesing own Java logic
Goto Forum:
  


Current Time: Wed Jul 16 13:48:25 EDT 2025

Powered by FUDForum. Page generated in 0.04931 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top