Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Eclipsepedia talk:Community Portal"

(BIRT Report)
(Reports are not generating when different user generate same report at same time: new section)
Line 8: Line 8:
  
 
i want one .bat file and one .sh file i thing its require for the deployment of report using jsp
 
i want one .bat file and one .sh file i thing its require for the deployment of report using jsp
 +
 +
== Reports are not generating when different user generate same report at same time  ==
 +
 +
Reports are not generating when different user generate same report at same time ____________________________________________________________________________________
 +
 +
<br> Java Code is as below ______________________
 +
 +
log.info(" in side generateReport:::"+formatType + " &nbsp;:: reportfilePath::"+reportfilePath+" &nbsp;:::outputFilePath::"+outputFilePath); String rptDocument = "temp.rptdocument"; String fileName=""; String status = ""; String errorDescription = ""; List errors = null;
 +
 +
IReportEngineFactory factory =null; try { final EngineConfig config = new EngineConfig(); config.setLogConfig(birtLogPath, Level.FINE);
 +
 +
HashMap hm = config.getAppContext(); hm.put( EngineConstants.APPCONTEXT_CLASSLOADER_KEY, ReportServiceImpl.class.getClassLoader());
 +
 +
hm.put("SubDetailsList", model);
 +
 +
// config.setAppContext(hm); Platform.startup(config);
 +
 +
factory = (IReportEngineFactory) Platform .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY); birtEngine = factory.createReportEngine(config);
 +
 +
// second way
 +
 +
// BirtEngineFactory bef = new BirtEngineFactory(); // birtEngine = bef.getObject(config);
 +
 +
// Third way
 +
 +
//birtEngine = SingletonClassForBirtFactory.getSingletonObject(config);
 +
 +
System.out.println("birtEngine Object "+birtEngine.hashCode());
 +
 +
} catch (Exception ex) { log.info("NOT able to create Rule engine instance " + ex.getMessage()); ex.printStackTrace(); throw new RuntimeException(ex.getMessage()); }
 +
 +
IRenderTask renderTask = null; String outputPath=outputFilePath; try { IReportRunnable ireportDocument = birtEngine .openReportDesign(new FileInputStream(new File( reportfilePath)));
 +
 +
IRunTask iRunTask = birtEngine.createRunTask(ireportDocument); iRunTask.run(rptDocument); IReportDocument ird = birtEngine.openReportDocument(rptDocument); IRenderOption options = new RenderOption();
 +
 +
<br>
 +
 +
________________________________________________________________
 +
 +
The script in template is as below __________________________________ activities = SubDetailsList; totalrows = activities.size(); currentrow = 0; cumulativeDistance = 0;

Revision as of 05:15, 28 June 2012

Completacion Java

Hello I am doing plug-in for jsp and I need that the publisher completes Java code. Whereupon bookstore can do this. Where encounter an example. Excuse I do not speak English, I translated with google.

Thanks.

BIRT Report

i want one .bat file and one .sh file i thing its require for the deployment of report using jsp

Reports are not generating when different user generate same report at same time

Reports are not generating when different user generate same report at same time ____________________________________________________________________________________


Java Code is as below ______________________

log.info(" in side generateReport:::"+formatType + "  :: reportfilePath::"+reportfilePath+"  :::outputFilePath::"+outputFilePath); String rptDocument = "temp.rptdocument"; String fileName=""; String status = ""; String errorDescription = ""; List errors = null;

IReportEngineFactory factory =null; try { final EngineConfig config = new EngineConfig(); config.setLogConfig(birtLogPath, Level.FINE);

HashMap hm = config.getAppContext(); hm.put( EngineConstants.APPCONTEXT_CLASSLOADER_KEY, ReportServiceImpl.class.getClassLoader());

hm.put("SubDetailsList", model);

// config.setAppContext(hm); Platform.startup(config);

factory = (IReportEngineFactory) Platform .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY); birtEngine = factory.createReportEngine(config);

// second way

// BirtEngineFactory bef = new BirtEngineFactory(); // birtEngine = bef.getObject(config);

// Third way

//birtEngine = SingletonClassForBirtFactory.getSingletonObject(config);

System.out.println("birtEngine Object "+birtEngine.hashCode());

} catch (Exception ex) { log.info("NOT able to create Rule engine instance " + ex.getMessage()); ex.printStackTrace(); throw new RuntimeException(ex.getMessage()); }

IRenderTask renderTask = null; String outputPath=outputFilePath; try { IReportRunnable ireportDocument = birtEngine .openReportDesign(new FileInputStream(new File( reportfilePath)));

IRunTask iRunTask = birtEngine.createRunTask(ireportDocument); iRunTask.run(rptDocument); IReportDocument ird = birtEngine.openReportDocument(rptDocument); IRenderOption options = new RenderOption();


________________________________________________________________

The script in template is as below __________________________________ activities = SubDetailsList; totalrows = activities.size(); currentrow = 0; cumulativeDistance = 0;

Back to the top