//initializd Environment EngineConfig config = new EngineConfig(); IPlatformContext context; config.setPlatformContext(context); //context use null Platform.startup(config); IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY); IReportEngine engine = factory.createReportEngine(config); //generate report // create report runnable String reportName = "/report/report.rptdesign"; IReportRunnable runnable = null; InputStream is = null; try { is = new FileInputStream(new File(reportName)); runnable = engine.openReportDesign(is); } catch (EngineException e) { ... } finally { ... //close is input stream } //create task IRunAndRenderTask task = engine.createRunAndRenderTask(runnable); task.setAppContext(new HashMap()); Map parameters = ....; //actual value from input argument representing parameters pass to birt report design file task.setParameterValues(parameters); ByteArrayOutputStream os = new ByteArrayOutputStream(); RenderOption renderOption = new HTMLRenderOption(); renderOption.setOutputFormat(RenderOption.OUTPUT_FORMAT_HTML); config.setEmitterConfiguration( HTMLRenderOption.OUTPUT_FORMAT_HTML, renderOption); task.setRenderOption(outputOption); //run task try { task.run(); } catch(EngineException e) { ... } finally { task.close(); } return os.toByteArray();