Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
Generating a OutputStream using HTMLRenderOption
Migrateduser
<p>Hi, I am trying to embed a BIRT report into an existing JSF/Richfaces project using BIRT Runtime 4.4.1 but for some reason the output only includes the Header and Footer from the report plus one table column header. The data and most of the table headers do not get included.</p>
<pre class="_prettyXprint">
status = "Starting Platform";
EngineConfig engineConfig = new EngineConfig();
Platform.startup( engineConfig );
status = "Create Engine";
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
IReportEngine engine = factory.createReportEngine( engineConfig );
status = "Create Report Runnable";
IReportRunnable runnable = engine.openReportDesign( reportName );
IRunAndRenderTask task = engine.createRunAndRenderTask( runnable );
IGetParameterDefinitionTask definitionTask = engine.createGetParameterDefinitionTask(runnable);
definitionTask.evaluateDefaults();
status = "Set Parameters";
HashMap<String, Object> params = definitionTask.getDefaultValues();
params.put("p_customer_internal_ref", selectedCustomer);
task.getAppContext().put("OdaJDBCDriverPassInConnection", jdbcTemplate.getDataSource().getConnection());
ByteArrayOutputStream bout = new ByteArrayOutputStream();
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFormat("html");
options.setOutputStream(bout);
task.setRenderOption(options);
task.setParameterValues(params);
task.run();
customerFacilities = bout.toString();
</pre>
<p>The customerFacilities is displayed using:</p>
<pre class="_prettyXprint">
<h:outputText id="customerFacilitiesReport" value="#{reportBean.customerFacilities}" escape="false" />
</pre>
<p>The report itself was designed using Eclipse downloaded from the BIRT website and works perfectly when viewed via Eclipse.</p>
<p> </p>
<p>Any help would be appreciated</p>
Find more posts tagged with
Comments
There are no comments yet