Skip to main content



      Home
Home » Archived » BIRT » multiple parameter passing problem
multiple parameter passing problem [message #150077] Sat, 01 April 2006 00:45 Go to next message
Eclipse UserFriend
Hello,

I want to pass comma separeted values as parameter. example

my sample query is like

Select * from tbProduct where productCategoryID in ( ? );


and i want to pass multiple category codes through a parameter ex.

ParamCategory=1,2,3,5,7,44 which are also dynamic.

Solve my Problem
Re: multiple parameter passing problem [message #150348 is a reply to message #150077] Mon, 03 April 2006 12:43 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
Refer to the bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=131089
You can try the workaround suggested in bugzilla comment.

Scott Rosenbaum
BIRT PMC

Manoj Herkar wrote:
> Hello,
>
> I want to pass comma separeted values as parameter. example
>
> my sample query is like
> Select * from tbProduct where productCategoryID in ( ? );
>
>
> and i want to pass multiple category codes through a parameter ex.
>
> ParamCategory=1,2,3,5,7,44 which are also dynamic.
>
> Solve my Problem
>
>
>
Re: multiple parameter passing problem [message #151178 is a reply to message #150077] Wed, 05 April 2006 15:02 Go to previous message
Eclipse UserFriend
Originally posted by: twindham.ugaais.com

Manoj,

This is kind of a hack, but it was suggested to me by Jason Weathersby:

It's rumored that future versions of BIRT will handle a list of parameter
values nicely, but this works just fine in the mean time.

In my example, I solved the problem of needing two IN parameter lists.

Put the code below in the script section of the report in the beforeOpen
method that
shows up when the DataSet is selected in the Outline view in Eclipse.

this.queryText = "SELECT " +
"Agent_Entity_ID, " +
"Agent_First_Name, " +
"Agent_Last_Name, " +
"State_ID, " +
"Company_ID, " +
"Agency_Name, " +
" FROM SomeTable " +
" WHERE Company_ID = 1 ";

if(params["agentID"] != null) {
this.queryText += " AND dbo.SomeTable.Agent_Entity_ID IN (" +
params["agentID"] + ")";
}

if(params["stateID"] != null) {
this.queryText += " AND dbo.SomeTable.State_ID IN (" +
params["stateID"] + ")";
}

The report has to have report parameters defined "agentID" and "stateID" and
both parameters have the property "Allow null vlaue" checked. So, now you
can pass 0 or more parameters in the url like in the following examples:

http://localhost:8080/birt/frameset?__report=reportName.rptd esign&agentID='0000025046','0000345234'&stateID='17','3'

http://localhost:8080/birt/frameset?__report=reportName.rptd esign&agentID='0000025046','0000345234'

http://localhost:8080/birt/frameset?__report=reportName.rptd esign&stateID='17','3'

Good luck,
Trace Windham

email me if you have questions about this, twindham@gmail.com


"Manoj Herkar" <mgherkar@gmail.com> wrote in message
news:a07b2e07ee10037e34cb3d265af85cd9$1@www.eclipse.org...
> Hello,
>
> I want to pass comma separeted values as parameter. example
>
> my sample query is like
> Select * from tbProduct where productCategoryID in ( ? );
>
>
> and i want to pass multiple category codes through a parameter ex.
>
> ParamCategory=1,2,3,5,7,44 which are also dynamic.
>
> Solve my Problem
>
>
>
Previous Topic:Data in report document is not couple with report design
Next Topic:Error to use weblogic pooled connection
Goto Forum:
  


Current Time: Wed Jul 16 08:59:47 EDT 2025

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

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

Back to the top