Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "RCP Example"

Line 9: Line 9:
  
 
== Setup ==
 
== Setup ==
1. Add the BIRT Viewer plug-in to your project dependencies.
+
1. Add the BIRT Viewer plug-in to your project dependencies.  Runtime dependencies will
 +
be determined by what options your reports use.  For example if you use a JDBC data source,
 +
then the JDBC plug-in will be required at runtime.
  
 
[[Image:Example.jpg]]
 
[[Image:Example.jpg]]
Line 39: Line 41:
 
  //option 4 display in SWT Browser
 
  //option 4 display in SWT Browser
 
  // using /run mapping.
 
  // using /run mapping.
  WebViewer.display(reportName,  
+
  //WebViewer.display(reportName,  
                  WebViewer.HTML,  
+
//                  WebViewer.HTML,  
                  browser,
+
//                  browser,
                  "run");
+
//                  "run");

Revision as of 01:18, 19 July 2006

RCP Example

This example explains how to deploy the BIRT Viewer within an RCP application.


Add comments at the bottom of the example.

BIRT Report Engine API Return to the BIRT Report Engine API examples

Setup

1. Add the BIRT Viewer plug-in to your project dependencies. Runtime dependencies will be determined by what options your reports use. For example if you use a JDBC data source, then the JDBC plug-in will be required at runtime.

Example.jpg

2. Call WebViewer.display from your code. Use one of the following options. Note that browser will need to be defined as an org.eclipse.swt.browser.Browser.

//option 1 display with no parameters in url.  
//Parameter box will display if
//required in a seperate window.  
//This uses the /run mapping
//WebViewer.display(reportName , 
//                  WebViewer.HTML, 
//                  false);	
//option 2 display BIRT Viewer in sepearate 
//Browser with /frameset mapping
//WebViewer.display(reportName , 
//                  WebViewer.HTML, 
//                  true);
//option 3 display in SWT Browser 
//using /frameset mapping.
//WebViewer.display(reportName, 
//                  WebViewer.HTML, 
//                  browser, 
//                  "frameset");
//option 4 display in SWT Browser
// using /run mapping.
//WebViewer.display(reportName, 
//                  WebViewer.HTML, 
//                  browser,
//                  "run");

Back to the top