Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Accessing the ReportEngine within a RCP configuration
Accessing the ReportEngine within a RCP configuration [message #1744645] Thu, 29 September 2016 08:52
Mario CC is currently offline Mario CCFriend
Messages: 6
Registered: April 2016
Junior Member
Hi,

I just started using Birt and I have a fundamental question:

How can I access a ReportEngine reference within a RCP config?

I integrated birt in an RCP application using the WebViewer.display method:


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);
	}
}



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.

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.

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.

I followed the integration tutorial:
http://www.eclipse.org/birt/documentation/integrating/reapi.php

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.

EngineConfig config = new EngineConfig( );
config.setEngineHome("");



I'm using Birt 4.5 in Eclipse Mars.

Thank you in advance,

Mario








[Updated on: Thu, 29 September 2016 11:51]

Report message to a moderator

Previous Topic:Out of memory while rendering PDF report
Next Topic:Showing Multiple pages in Footer
Goto Forum:
  


Current Time: Mon Sep 23 16:40:28 GMT 2024

Powered by FUDForum. Page generated in 0.03854 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top