Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Passing parameters values from java code for query
Passing parameters values from java code for query [message #509660] Sun, 24 January 2010 13:00 Go to next message
govind Ra is currently offline govind RaFriend
Messages: 95
Registered: July 2009
Member
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 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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
Re: Passing parameters values from java code for query [message #510292 is a reply to message #509856] Wed, 27 January 2010 06:42 Go to previous message
govind Ra is currently offline govind RaFriend
Messages: 95
Registered: July 2009
Member
Hi Jason

Thanks a lot for the inputs Razz

I will also go through ur webinar

Thanks once again

Regards
Govind
Previous Topic:Create vector based charts in PDF
Next Topic:Auto Fit Property for text in Actuate BIRT
Goto Forum:
  


Current Time: Sat Apr 27 02:52:58 GMT 2024

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

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

Back to the top