Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » report paramas launching the web viewer from my rcp
report paramas launching the web viewer from my rcp [message #510823] Thu, 28 January 2010 18:12 Go to next message
Eclipse UserFriend
Originally posted by: rodrigo.garcia.kotasoft.com

Hi,

I'd like to know if it's possible to pass report parameters launching
the report with the web viewer from my rcp.

At present I'm doing that:

URL[] urls =
FileLocator.findEntries(BirtBundleActivator.getDefault().get Bundle(),
new Path("/work_info.rptdesign"));
String path = FileLocator.toFileURL(urls[0]).getFile();

HashMap<String, Object> myparms = new HashMap<String,
Object>();
myparms.put( "SERVLET_NAME_KEY", "frameset" );
myparms.put( "FORMAT_KEY", "html" );
myparms.put( "ALLOW_PAGE", true );

ViewerPlugin.getDefault( ).getPluginPreferences(
).setValue("APPCONTEXT_EXTENSION_KEY", "WPSBirtReportAppContext");
WebViewer.display(path, progrressBrowser, myparms);


Thanks.
Re: report paramas launching the web viewer from my rcp [message #510831 is a reply to message #510823] Thu, 28 January 2010 18:41 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Rodrigo,

Use the EMITTER_OPTIONS_KEY: In this example Top Count is a report
parameter.



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

Jason

Rodrigo García wrote:
> Hi,
>
> I'd like to know if it's possible to pass report parameters launching
> the report with the web viewer from my rcp.
>
> At present I'm doing that:
>
> URL[] urls =
> FileLocator.findEntries(BirtBundleActivator.getDefault().get Bundle(),
> new Path("/work_info.rptdesign"));
> String path = FileLocator.toFileURL(urls[0]).getFile();
>
> HashMap<String, Object> myparms = new HashMap<String,
> Object>();
> myparms.put( "SERVLET_NAME_KEY", "frameset" );
> myparms.put( "FORMAT_KEY", "html" );
> myparms.put( "ALLOW_PAGE", true );
>
> ViewerPlugin.getDefault( ).getPluginPreferences(
> ).setValue("APPCONTEXT_EXTENSION_KEY", "WPSBirtReportAppContext");
> WebViewer.display(path, progrressBrowser, myparms);
>
>
> Thanks.
Re: report paramas launching the web viewer from my rcp [message #1744582 is a reply to message #510831] Wed, 28 September 2016 15:01 Go to previous message
Mario CC is currently offline Mario CCFriend
Messages: 6
Registered: April 2016
Junior Member
Hi guys,
I'm trying to apply this method to pass some parameters to my report as Rodrigo.
My problem now is: how can access them from the script perspective? for example, I would like to acces them in the fecth script. I tried the "common" way params["parameterName"] but it does not work.
Thanks you in advance,

Mario
Previous Topic:Connection Profile not taken into account, still using datasource used in designer
Next Topic:Out of memory while rendering PDF report
Goto Forum:
  


Current Time: Fri Apr 19 21:48:49 GMT 2024

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

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

Back to the top