Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsBirt Report
https://www.eclipse.org/forums/index.php/mv/msg/1090015/1776326/#msg_1776326
I am new to Java also to BIRT tool. I have designed a report using BIRT designer and then I imported this .rptdesign file in the project that I was developing using eclipse mars. When I run this project, the output report file is generated but it is blank. I am unable to understand, the same report runs when using the BIRT designer but not in eclipse mars.
Can someone please help me out.
The code to call the BIRT report in java is as below :-
final IReportEngineFactory FACTORY = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
engine = FACTORY.createReportEngine(config);
engine.changeLogLevel(Level.WARNING);
final IReportRunnable DESIGN = engine.openReportDesign("G:/Manjusha/Projects/BullsEye/Workspace_Mars/Probability/Probability/src/Probability/Round.rptdesign");
final IRunAndRenderTask TASK = engine.createRunAndRenderTask(DESIGN);
// Set Render context to handle URL and image locations
final HTMLRenderContext RENDER_CONTEXT = new HTMLRenderContext();
// Set the Base URL for all actions
// RENDER_CONTEXT.setBaseURL("http:// 172.16.206.219/");
final HashMap<String, HTMLRenderContext> CONTEXT = new HashMap<String, HTMLRenderContext>();
CONTEXT.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT, RENDER_CONTEXT);
TASK.setAppContext(CONTEXT);
// Set PARAMETERS for the report
//final HTMLRenderOption HTML_OPTIONS = new HTMLRenderOption();
//HTML_OPTIONS.setOutputFileName("G:\\Manjusha\\Projects\\BullsEye\\Workspace_Mars\\Probability\\Probability\\Report.pdf");
//HTML_OPTIONS.setOutputFormat("pdf");
PDFRenderOption options = new PDFRenderOption( );
options.setOutputFormat("pdf");
options.setOutputFileName("G:/Manjusha/Projects/BullsEye/Workspace_Mars/Probability/Probability/Report.pdf" );