Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 111790 Details for
Bug 246340
[Performance improvements] Slow Chart export to PDF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
java code to run reports
C5.java (text/x-java), 2.17 KB, created by
APTND
on 2008-09-05 05:31:12 EDT
(
hide
)
Description:
java code to run reports
Filename:
MIME Type:
Creator:
APTND
Created:
2008-09-05 05:31:12 EDT
Size:
2.17 KB
patch
obsolete
>package birt.integration; > >import java.util.logging.Level; > >import org.eclipse.birt.core.exception.BirtException; >import org.eclipse.birt.core.framework.Platform; >import org.eclipse.birt.report.engine.api.EngineConfig; >import org.eclipse.birt.report.engine.api.EngineException; >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; >import org.eclipse.birt.report.engine.api.PDFRenderOption; > >public class C5 { > > /** > * @param args > */ > public static void main(String[] args) throws Exception { > > long start = System.currentTimeMillis(); > int reports = 50; > > executeReport(reports); > > long end = System.currentTimeMillis(); > > System.out.println(((end - start)/reports) + "ms each " ); > } > > private static IReportEngine globalEngine = null; > > public static void executeReport(int maxReports) > throws EngineException { > > try { > IReportEngine engine = null; > EngineConfig config = null; > config = new EngineConfig(); > config > .setBIRTHome("C:\\Program Files\\birt-runtime-2_3_0\\ReportEngine"); > config.setLogConfig("D:/", Level.INFO); > Platform.startup(config); > IReportEngineFactory factory = (IReportEngineFactory) Platform > .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY); > engine = factory.createReportEngine(config); > IReportRunnable design = null; > // Open the report design > > design = engine > .openReportDesign("D:\\Dev\\eclipse\\My Reports\\Chart\\c3.rptdesign"); > //generate a few reports from the design > for (int i = 0; i < maxReports; i++) { > IRunAndRenderTask task = engine.createRunAndRenderTask(design); > PDFRenderOption options = new PDFRenderOption(); > options.setOutputFileName("D:/Dev/Eclipse/My Reports/output/test" + i + ".pdf"); > options.setOutputFormat("pdf"); > > task.setRenderOption(options); > task.run(); > task.close(); > } > engine.destroy(); > } catch (Exception ex) { > ex.printStackTrace(); > } finally { > Platform.shutdown(); > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 246340
:
111788
|
111789
| 111790 |
156480
|
156481
|
156482