Home » Archived » BIRT » WebViewer on RAP(WebViewer on RAP)
WebViewer on RAP [message #641634] |
Fri, 26 November 2010 06:59  |
Eclipse User |
|
|
|
hello,
I'm working on a single source business application which works with both RCP and RAP.
what would be the best approach to integrate BIRT reports in to RCP/RAP ?
our requirement is such that we would prefer to run reports within the browser widget using WebViewer.
ex.
WebViewer.display(path, WebViewer.HTML, _browser, "frameset");
where
path includes the [report_file.rptdesign]
i'm using RAP 1.4 M3 and BIRT 2.6.1
i've examined the following article, but did not find exactly what i was looking.
http://wiki.eclipse.org/RAP/BIRT_Integration
our requirement is to open .rptdesign report files within browser widget using WebViewer.
kindly let me know if any best practices material/resource/help is available for the above.
regards,
sudesh
|
|
|
Re: WebViewer on RAP [message #641881 is a reply to message #641634] |
Sun, 28 November 2010 23:57   |
Eclipse User |
|
|
|
Sudesh,
Here is a tutorial with BIRT and RAP.
If you just want to use the viewer plugin with a browser widget that is
pretty simple. See examples with this presentation.
http://www.birt-exchange.org/org/devshare/deploying-birt-rep orts/1187-eclipsecon-2010-birt-metal-ppt/
Essentially if you have the birt plugins in your runtime you can add the
following dependencies to your app:
org.eclipse.birt.report.viewer
org.eclipse.birt.core
org.eclipse.help.appserver
org.eclipse.help.base
and call
HashMap myparms = new HashMap();
HashMap emitmap = new HashMap();
myparms.put("SERVLET_NAME_KEY", "frameset");
myparms.put("FORMAT_KEY", "html");
//myparms.put("RESOURCE_FOLDER_KEY", "c:/myresources");
myparms.put("ALLOW_PAGE", "false");
myparms.put("SHOW_PARAMETER_PAGE", "false");
emitmap.put("Top Count", "6");
myparms.put("EMITTER_OPTIONS_KEY", emitmap);
//myparms.put("MAX_ROWS_KEY", "500");
WebViewer.display(rpt, browser, myparms);
where browser is the swt browser widget.
Jason
On 11/26/2010 6:59 AM, Sudesh Bulathsinhala wrote:
> hello,
>
> I'm working on a single source business application which works with
> both RCP and RAP.
>
> what would be the best approach to integrate BIRT reports in to RCP/RAP ?
>
> our requirement is such that we would prefer to run reports within the
> browser widget using WebViewer.
>
> ex.
> WebViewer.display(path, WebViewer.HTML, _browser, "frameset");
> where path includes the [report_file.rptdesign]
>
> i'm using RAP 1.4 M3 and BIRT 2.6.1
>
> i've examined the following article, but did not find exactly what i was
> looking.
>
> http://wiki.eclipse.org/RAP/BIRT_Integration
>
> our requirement is to open .rptdesign report files within browser widget
> using WebViewer.
>
>
> kindly let me know if any best practices material/resource/help is
> available for the above.
>
> regards,
> sudesh
|
|
| | | | | | | | |
Re: WebViewer on RAP [message #643507 is a reply to message #643410] |
Tue, 07 December 2010 02:46   |
Eclipse User |
|
|
|
hello jason,
i've marked [org.eclipse.birt.report.designer.ui] optional as you suggested, but still it doesn't work.
i'm using the following method to invoke the report :
public void decorateReportInBrowser(Browser browser, String reportFilePath,
String servletNameKey, String formatKey, boolean allowPage,
boolean showParameterPage, int topCount, int maxRows) {
HashMap reportParams = new HashMap();
HashMap emitterParams = new HashMap();
reportParams.put("SERVLET_NAME_KEY", servletNameKey);
reportParams.put("FORMAT_KEY", formatKey);
reportParams.put("MAX_ROWS_KEY", Integer.toString(maxRows));
/* myparms.put("RESOURCE_FOLDER_KEY", "c:/myresources"); */
reportParams.put("ALLOW_PAGE", Boolean.toString(allowPage));
reportParams.put("SHOW_PARAMETER_PAGE",
Boolean.toString(showParameterPage));
emitterParams.put("Top Count", Integer.toString(topCount));
reportParams.put("EMITTER_OPTIONS_KEY", emitterParams);
WebViewer.display(reportFilePath, browser, reportParams);
}
ERROR MESSAGE :
!ENTRY org.eclipse.rap.ui 4 0 2010-12-07 13:09:48.374
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/birt/report/designer/ui/ReportPlugin
at org.eclipse.birt.report.viewer.utilities.ViewerClassPathHelp er.getWorkspaceClassPath(ViewerClassPathHelper.java:191)
at org.eclipse.birt.report.viewer.utilities.WebViewer.startWebA pp(WebViewer.java:756)
at org.eclipse.birt.report.viewer.utilities.WebViewer.display(W ebViewer.java:1004)
at org.eclipse.birt.report.viewer.utilities.WebViewer.display(W ebViewer.java:998)
at com.argos.sys.base.controller.birt.provider.CustomBirtReport Provider.decorateReportInBrowser(CustomBirtReportProvider.ja va:42)
at com.argos.sys.base.controller.widget.editor.CustomReportEdit orPart.invokeRunReport(CustomReportEditorPart.java:381)
at com.argos.sys.base.controller.widget.editor.CustomReportEdit orPart.access$1(CustomReportEditorPart.java:367)
at com.argos.sys.base.controller.widget.editor.CustomReportEdit orPart$5.handleEvent(CustomReportEditorPart.java:319)
at org.eclipse.swt.internal.widgets.UntypedEventAdapter.dispatc hEvent(UntypedEventAdapter.java:651)
at org.eclipse.swt.internal.widgets.UntypedEventAdapter.widgetS elected(UntypedEventAdapter.java:88)
at org.eclipse.swt.events.SelectionEvent.dispatchToObserver(Sel ectionEvent.java:194)
at org.eclipse.rwt.internal.events.Event.processEvent(Event.jav a:44)
at org.eclipse.swt.events.TypedEvent.processEvent(TypedEvent.ja va:161)
at org.eclipse.swt.events.TypedEvent.executeNext(TypedEvent.jav a:201)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.j ava:1100)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1090)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2390)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2351)
at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:22 06)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:424)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at org.eclipse.jface.internal.databinding.realmadapter.RealmAda pter.run(RealmAdapter.java:44)
at org.eclipse.rap.ui.internal.RealmAdapterHook.runWithDefault( RealmAdapterHook.java:48)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:427)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:157)
at com.argos.sys.client.entrypoint._rap.ClientEntryPoint.create UI(ClientEntryPoint.java:18)
at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPointManager.java:92)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.java:245)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RWTLifeCycle.java:114)
at java.lang.Thread.run(Unknown Source)
at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.jav a:102)
Caused by: java.lang.ClassNotFoundException: org.eclipse.birt.report.designer.ui.ReportPlugin
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 31 more
Thanks,
Sudesh
[Updated on: Tue, 07 December 2010 02:47] by Moderator
|
|
|
Re: WebViewer on RAP [message #643620 is a reply to message #643507] |
Tue, 07 December 2010 11:03   |
Eclipse User |
|
|
|
Sudesh,
This looks like a change that was introduced for designer classpath
issues. In the WebViewer class there is a startWebApp method that adds
urls to the cp based on the designer classpath:
try
{
// if don't load debug ui, viewer will handle to set workspace
// classpath
String debugMode = System.getProperty( REPORT_DEBUT_MODE );
if ( debugMode == null )
{
// get workspace classpath
URL[] urls = ViewerClassPathHelper.getWorkspaceClassPath(
reportFileName );
if ( reloadableClassLoader == null )
{
// create ReloadableClassLoader
reloadableClassLoader = new ReloadableClassLoader( urls,
WebViewer.class.getClassLoader( ) );
}
else
{
// reload class
reloadableClassLoader.setUrls( urls );
reloadableClassLoader.reload( );
}
}
Can you try to set the debug mode to true?
System.setProperty( WebViewer.REPORT_DEBUT_MODE,true );
before calling your viewer code? Also it would be good if you could log
a bug for this.
Jason
On 12/7/2010 2:46 AM, Sudesh Bulathsinhala wrote:
> hello jason,
>
> i've marked [org.eclipse.birt.report.designer.ui] optional as you
> suggested, but still it doesn't work.
>
> i'm using the following method to invoke the report :
>
> public void decorateReportInBrowser(Browser browser, String reportFilePath,
> String servletNameKey, String formatKey, boolean allowPage,
> boolean showParameterPage, int topCount, int maxRows) {
> HashMap reportParams = new HashMap();
> HashMap emitterParams = new HashMap();
> reportParams.put("SERVLET_NAME_KEY", servletNameKey);
> reportParams.put("FORMAT_KEY", formatKey);
> reportParams.put("MAX_ROWS_KEY", Integer.toString(maxRows));
> /* myparms.put("RESOURCE_FOLDER_KEY", "c:/myresources"); */
> reportParams.put("ALLOW_PAGE", Boolean.toString(allowPage));
> reportParams.put("SHOW_PARAMETER_PAGE",
> Boolean.toString(showParameterPage));
> emitterParams.put("Top Count", Integer.toString(topCount));
> reportParams.put("EMITTER_OPTIONS_KEY", emitterParams);
> WebViewer.display(reportFilePath, browser, reportParams);
> }
>
>
> ERROR MESSAGE :
>
> !ENTRY org.eclipse.rap.ui 4 0 2010-12-07 13:09:48.374
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.NoClassDefFoundError:
> org/eclipse/birt/report/designer/ui/ReportPlugin
> at org.eclipse.birt.report.viewer.utilities.ViewerClassPathHelp
> er.getWorkspaceClassPath(ViewerClassPathHelper.java:191)
> at org.eclipse.birt.report.viewer.utilities.WebViewer.startWebA
> pp(WebViewer.java:756)
> at org.eclipse.birt.report.viewer.utilities.WebViewer.display(W
> ebViewer.java:1004)
> at org.eclipse.birt.report.viewer.utilities.WebViewer.display(W
> ebViewer.java:998)
> at com.argos.sys.base.controller.birt.provider.CustomBirtReport
> Provider.decorateReportInBrowser(CustomBirtReportProvider.ja va:42)
> at com.argos.sys.base.controller.widget.editor.CustomReportEdit
> orPart.invokeRunReport(CustomReportEditorPart.java:381)
> at com.argos.sys.base.controller.widget.editor.CustomReportEdit
> orPart.access$1(CustomReportEditorPart.java:367)
> at com.argos.sys.base.controller.widget.editor.CustomReportEdit
> orPart$5.handleEvent(CustomReportEditorPart.java:319)
> at org.eclipse.swt.internal.widgets.UntypedEventAdapter.dispatc
> hEvent(UntypedEventAdapter.java:651)
> at org.eclipse.swt.internal.widgets.UntypedEventAdapter.widgetS
> elected(UntypedEventAdapter.java:88)
> at org.eclipse.swt.events.SelectionEvent.dispatchToObserver(Sel
> ectionEvent.java:194)
> at org.eclipse.rwt.internal.events.Event.processEvent(Event.jav a:44)
> at org.eclipse.swt.events.TypedEvent.processEvent(TypedEvent.ja va:161)
> at org.eclipse.swt.events.TypedEvent.executeNext(TypedEvent.jav a:201)
> at org.eclipse.swt.widgets.Display.runPendingMessages(Display.j ava:1100)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1090)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2390)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2351)
> at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:22 06)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:424)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault
> (Realm.java:332)
> at org.eclipse.jface.internal.databinding.realmadapter.RealmAda
> pter.run(RealmAdapter.java:44)
> at org.eclipse.rap.ui.internal.RealmAdapterHook.runWithDefault(
> RealmAdapterHook.java:48)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work
> bench.java:427)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:157)
> at com.argos.sys.client.entrypoint._rap.ClientEntryPoint.create
> UI(ClientEntryPoint.java:18)
> at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU
> I(EntryPointManager.java:92)
> at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT
> LifeCycle.java:245)
> at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont
> roller.run(RWTLifeCycle.java:114)
> at java.lang.Thread.run(Unknown Source)
> at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.jav a:102)
> Caused by: java.lang.ClassNotFoundException:
> org.eclipse.birt.report.designer.ui.ReportPlugin
> at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter
> nal(BundleLoader.java:513)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund
> leLoader.java:429)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund
> leLoader.java:417)
> at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa
> dClass(DefaultClassLoader.java:107)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> ... 31 more
>
>
>
|
|
| | | | |
Re: WebViewer on RAP [message #871996 is a reply to message #641634] |
Tue, 15 May 2012 05:11   |
Eclipse User |
|
|
|
Hi Jason,
We are trying to implement exactly similar stuff of seeing the web viewer in rap browser but without any success.
Here is code we have used to call start and display webviewer
HashMap reportParams = new HashMap();
HashMap emitterParams = new HashMap();
reportParams.put("SERVLET_NAME_KEY", "frameset");
reportParams.put("FORMAT_KEY", "html");
reportParams.put("MAX_ROWS_KEY", "500");
reportParams.put("ALLOW_PAGE", "true");
reportParams.put("SHOW_PARAMETER_PAGE",
Boolean.toString(false));
emitterParams.put("Top Count", "6");
reportParams.put("EMITTER_OPTIONS_KEY", emitterParams);
System.setProperty( WebViewer.REPORT_DEBUT_MODE, "true");
Shell dialog = new Shell (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
dialog.setLayout(new FillLayout());
Browser browser = new Browser(dialog, SWT.NONE);
dialog.setText ("Birt Reporting");
dialog.setSize (1000, 800);
dialog.open ();
WebViewer.startup();
WebViewer.display(nameReport, browser, reportParams);
The browser just goes on processing and doesnt shows anything...are we doing something incorrect here??
Thanks
|
|
|
Re: WebViewer on RAP [message #872273 is a reply to message #871996] |
Tue, 15 May 2012 16:10   |
Eclipse User |
|
|
|
What birt version are you using? If you comment out this line:
reportParams.put("SHOW_PARAMETER_PAGE",
Boolean.toString(false));
does it work?
Jason
On 5/15/2012 5:11 AM, Rohit rai wrote:
> Hi Jason,
>
> We are trying to implement exactly similar stuff of seeing the web
> viewer in rap browser but without any success.
> Here is code we have used to call start and display webviewer
> HashMap reportParams = new HashMap();
> HashMap emitterParams = new HashMap();
> reportParams.put("SERVLET_NAME_KEY", "frameset");
> reportParams.put("FORMAT_KEY", "html");
> reportParams.put("MAX_ROWS_KEY", "500");
>
> reportParams.put("ALLOW_PAGE", "true");
> reportParams.put("SHOW_PARAMETER_PAGE",
> Boolean.toString(false));
> emitterParams.put("Top Count", "6");
> reportParams.put("EMITTER_OPTIONS_KEY", emitterParams);
> System.setProperty( WebViewer.REPORT_DEBUT_MODE, "true");
>
> Shell dialog = new Shell
> (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
> dialog.setLayout(new FillLayout());
>
> Browser browser = new Browser(dialog, SWT.NONE);
>
> dialog.setText ("Birt Reporting");
> dialog.setSize (1000, 800);
> dialog.open ();
> WebViewer.startup();
> WebViewer.display(nameReport, browser, reportParams);
>
> The browser just goes on processing and doesnt shows anything...are we
> doing something incorrect here??
>
> Thanks
|
|
| |
Re: WebViewer on RAP [message #873157 is a reply to message #872464] |
Thu, 17 May 2012 11:50   |
Eclipse User |
|
|
|
Do you have all the birt plugins available in the runtime of your app?
If you use WebViewer.display(nameReport, reportParams); instead of
WebViewer.display(nameReport, browser, reportParams); is there any
difference?
Jason
On 5/16/2012 3:19 AM, Rohit rai wrote:
> Thanks for the reply Jason!
> I tried removing reportParams.put("SHOW_PARAMETER_PAGE",
> Boolean.toString(false)) from the code but its behaving the same.
> Actually, when "WebViewer.display(nameReport, browser, reportParams);"
> code is executed, the browser goes on processing and the application
> become unavailable and needs to restarted
> I also gets following error on the console
> May 16, 2012 12:36:42 PM org.apache.axis.utils.JavaUtils
> isAttachmentSupported
> WARNING: Unable to find required classes (javax.activation.DataHandler
> and javax.mail.internet.MimeMultipart). Attachment support is disabled.
>
> I am using 3.7 version of birt
> (org.eclipse.birt.report.viewer_3.7.0.v20110602) and dependencies
>
> Let me know you views.Thanks!
|
|
| | | | | | |
WebViewer on RAP [message #1084259 is a reply to message #875396] |
Sun, 11 August 2013 03:41  |
Eclipse User |
|
|
|
Hi, Jason,
In order to make the content of report 100% as same as the SQL records shown on the TableViewer, I prefer transmitting the resultset(a data model ArrayList) directly into the Birt report, I'd like to use WebViewer to achieve that!
steps that I followed:
1.to install Elipse Kepler "Eclipse IDE for Java and Report Developers" as well as RAP2.1, and be sure the RAP app works.
2.to add all plugins in $P{eclipse_home} into the target above.
3.to add a working report and corresponding code into the RAP app, on "Run Configurartions", click "Add Required Bubdle" as well as "Validate" to make sure no
error message!
4.to start the RAP app.
from console, I saw the RAP app launched, but it just halted on body.html still, neither further screen nor error message, but it's good before adding WebViewer's required bubdles!
My goal is to normally show charts and SQL data on RAP apps, based on Eclipse Kepler and RAP2.1/BIRT4.3.0, can someone kindly let me know:
1.a clear list of what pugins and versions are needed.
2.any needed procedures or points should be followed.
My dependencies on MANIFEST.MF are :
Require-Bundle: org.eclipse.rap.ui;bundle-version="2.1.0",
org.eclipse.rap.ui.forms;bundle-version="2.1.0",
org.eclipse.birt.report.viewer,
org.eclipse.birt.report.engine.emitter.html,
org.eclipse.birt,
org.eclipse.birt.chart.ui,
org.eclipse.birt.chart.device.extension,
org.eclipse.birt.chart.device.pdf,
org.eclipse.birt.chart.device.svg,
org.eclipse.birt.chart.device.swt,
org.eclipse.birt.chart.engine.extension,
org.eclipse.birt.chart.reportitem,
org.eclipse.birt.chart.reportitem.ui,
org.eclipse.birt.chart.ui.extension,
org.eclipse.birt.core.script.function,
org.eclipse.birt.report.engine.script.javascript
Thanks and regards,
David
[Updated on: Sun, 11 August 2013 03:42] by Moderator
|
|
|
Goto Forum:
Current Time: Wed Mar 26 08:16:38 EDT 2025
Powered by FUDForum. Page generated in 0.06317 seconds
|