Passing parameters values from java code for query [message #509660] |
Sun, 24 January 2010 13:00 |
|
Hello All
I am using
WebViewer.display(reportName, browser, myparms);
to display report the on viewer.
I want to set parameters some value from java code.
SELECT * FROM sometable where id = ?;
I want to pass the ? value
Can any one give me some inputs.
Regards
Govind
|
|
|
Re: Passing parameters values from java code for query [message #509856 is a reply to message #509660] |
Mon, 25 January 2010 15:36 |
|
Govind,
I am going to talk about this a little tomorrow on the Webinar on BIRT
integration, but the short answer is to use:
HashMap myparms = new HashMap();
HashMap emitmap = new HashMap();
myparms.put("SERVLET_NAME_KEY", "frameset");
myparms.put("FORMAT_KEY", "html");
myparms.put("ALLOW_PAGE", "false");
myparms.put("SHOW_PARAMETER_PAGE", "false");
emitmap.put("Top Count", "6");
myparms.put("EMITTER_OPTIONS_KEY", emitmap);
WebViewer.display(rpt, browser, myparms);
I put the parameters in the emitmap which is then set to the
EMITTER_OPTIONS_KEY.
In this example Top Count is a report parameter.
Jason
govind wrote:
> Hello All
>
> I am using WebViewer.display(reportName, browser, myparms);
>
> to display report the on viewer.
>
> I want to set parameters some value from java code.
> SELECT * FROM sometable where id = ?;
>
> I want to pass the ? value
> Can any one give me some inputs.
>
> Regards
> Govind
|
|
|
|
Powered by
FUDForum. Page generated in 0.03162 seconds