<p><span>Hi all,<br><br>
I just started using Birt and I have a fundamental question:<br><br><b>How can I access a ReportEngine reference within a RCP config?</b><br><br>
I integrated birt in an RCP application using the WebViewer.display method:</span></p>
<div>
<pre class="_prettyXprint">
public class ReportingView extends ViewPart {
public void createPartControl(Composite parent) {
Browser browser = new Browser(parent, SWT.NONE);
HashMap<String, Serializable> myparms = new HashMap<String, Serializable>();
// Birt Viewer parameters
myparms.put("SERVLET_NAME_KEY", "frameset");
myparms.put("FORMAT_KEY", "html");
myparms.put("ALLOW_PAGE", "false");
myparms.put("SHOW_PARAMETER_PAGE", "true");
String path = "";
Bundle bundle = Platform.getBundle("com.example.workbench.reportingview");
URL url = FileLocator.find(bundle, new Path("report.rptdesign"), null);
try {
path = FileLocator.toFileURL(url).getPath();
} catch (IOException e) {
e.printStackTrace();
}
WebViewer.display(path, browser, myparms);
}
}
</pre>
<p><span>With some extra configurations, I managed to create a view in my RCP environment that launches a report viewer in order to visualize my report. The Birt engine and the viewer are integrated as plugins.<br><br>
From this same class, I'm trying to re-execute the report programatically passing a parameter depending on the users interaction with the launched RCP workbench.<br><br>
How can I access the reference to the actual Report Engine? The report has been executed once, and there is already an engine running...therefore, I supose that it is not necessary to create a new instance of EngineConfig. I just want to access my actual engine (deployed as a plugin) or report and re-execute the report passing some new parameters: as if I was clicking on the "execute raport" icon once the report has already executed once.<br><br>
I followed the integration tutorial:<br><a data-ipb='nomediaparse' href='
http://www.eclipse.org/birt/documentation/integrating/reapi.php'>http://www.eclipse.org/birt/documentation/integrating/reapi.php</a><br><br>
I also tried in order to access the running engine but it did not work. Actually I'm pretty sure that there is no need to create a new instance of the EngineConf but I could not find an alternative way.</span><br>
</p>
</div>
<div>
<pre class="_prettyXprint">
EngineConfig config = new EngineConfig( );
config.setEngineHome("");
</pre>
<p><span>I'm using Birt 4.5 in Eclipse Mars.<br><br>
Thank you in advance,<br><br>
Mario</span></p>
</div>
<p> </p>