|
|
Line 1: |
Line 1: |
− | == Completacion Java ==
| + | This is not a good forum for asking project-specific questions. |
| | | |
− | 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.
| + | If you have questions about BIRT, please direct them to the [http://www.eclipse.org/forums/eclipse.birt BIRT project forum]. In general, project- or technology-specific questions should be posed in the [http://www.eclipse.org/forums community forums]. Some Eclipse Projects use different means of communicating with their communities; those means are documented on the [http://www.eclipse.org/projects/listofprojects.php project pages]. |
− | | + | |
− | 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 ____________________________________________________________________________________
| + | |
− | | + | |
− | <br> 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();
| + | |
− | | + | |
− | <br>
| + | |
− | | + | |
− | ________________________________________________________________
| + | |
− | | + | |
− | The script in template is as below __________________________________ activities = SubDetailsList; totalrows = activities.size(); currentrow = 0; cumulativeDistance = 0;
| + | |
This is not a good forum for asking project-specific questions.