Java integration. Not able to link with Data Objects

ferbeni88@hotmail.com
edited February 11, 2022 in Analytics #1
<p>Hello,</p>
<p> </p>
<p>I'm using actuate birt runtime and platform to set up a simple junit test to run the engine report. I am able to generate html from my report design. But when I try to link my report desing with an report object, I always getting the same error:</p>
<p><span style="color:rgb(255,0,0);font-family:Arial;font-size:13.3333px;">Failed to find out data source of data set "BETMANDMODUL_FINANCE".</span></p>
<p> </p>
<p>This is how I run report engine:</p>
<pre class="_prettyXprint _lang-nocode">
IRenderOption render = new HTMLRenderOption();
System.setProperty("RUN_UNDER_ECLIPSE", "false");
EngineConfig config = new EngineConfig();

//C:\OpenText\InformationHub\modules\BIRTiHub\iHub\web\birtservice\WEB-INF\platform
config.setBIRTHome(BIRT_HOME);

config.setLogConfig(LOGS_PATH, Level.ALL);
// important for BIRT to know resources
config.setResourcePath(REPORTS_RESOURCES_PATH);
// Default Render Option
config.setDefaultEmitter("html", render.getEmitterID());
render.setOutputFormat("html");

try{
Platform.startup(config);
}catch(BirtException e){
e.printStackTrace();
}

IReportEngineFactory engineFactory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
IReportEngine engine = engineFactory.createReportEngine(config);

IReportRunnable design = null;

try {
design = engine.openReportDesign(new FileInputStream(reportDesignPath));
} catch (EngineException | IOException e) {
e.printStackTrace();
}

IRunAndRenderTask task = engine.createRunAndRenderTask(design);
task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY, TestReport.class.getClassLoader());

String outputFilename= getOutputName(reportDesignPath);
render.setOutputFileName(outputFilename);
// set the render option
task.setRenderOption(render);

try {
// runs the report and generate output.
task.run();
// close the report.
task.close();
}catch(EngineException e){
e.printStackTrace();
}
</pre>
<p>I built the reportdesign with Birt designer professional 4.4 and from the IDE it's working.</p>
<p> </p>
<p>Can anyone help me?</p>
<p> </p>
<p>Thank you very much.</p>

Comments

  • <p>I'm trying to understand your use case.  So you've developed a report in commercial BIRT Designer, and now you want to run the report?</p>
    <p> </p>
    <p>Are you using this with an iHub?  Or the AJC?</p>
    <p> </p>
    <p>What does your report design look like?  Specifically, what is the Data Source for BETMANDMODUL_FINANCE?</p>
    <p> </p>
    <p>Since you are using commercial BIRT, have you opened a case with your local OpenText Support center?</p>
    Warning No formatter is installed for the format ipb