Skip to main content



      Home
Home » Archived » BIRT » Parameter and SQL Query question.
Parameter and SQL Query question. [message #208304] Tue, 26 December 2006 15:06 Go to next message
Eclipse UserFriend
Originally posted by: ramm.mvmills.com

Has anyone done this before?
User wants to enter multiple values or select multiple values from a
drop down box. I can change the SQL query to use the IN operator-
something like "ColumnA in (list of values)". How do I link the multiple
list of the values in the WHERE clause to the user selections?
Any suggestions?
Re: Parameter and SQL Query question. [message #208421 is a reply to message #208304] Thu, 28 December 2006 13:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: barrygwells.gmail.com

I don't know if this helps but I kinda had the same question and received
the below answer.

You could use property binding to make your sql text dynamically at
runtime:
"Select "+ params["param1"] +
" from users where ur_id=123"
Then you can pass what you want by report parameter params["param1"] into
your query.
Re: Parameter and SQL Query question. [message #208438 is a reply to message #208304] Fri, 29 December 2006 04:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sangeetha.r.ilantus.com

Hi Ram,
Can you give me more detail about this?
Are you creating a runtime report?

Regards,
Sangeetha R
Re: Parameter and SQL Query question. [message #208503 is a reply to message #208304] Fri, 29 December 2006 19:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johnw.innoventsolutions.com

Ram,

There are several ways to do this. In the default BIRT viewer, you can
set the parameter to be comma delimited (or whatever), then override the
fetch method for the dataset and get a result set for each value, or you
can just create a dynamic query as outlined in the Birt Helpfile (BIRT
Field Guide to Reporting/Retrieving Data/How to define a dynamic query).

If you want a multi-select listbox or combo-box, you will need to use an
external form to get that data. You can then use your application server
to parse the paraemters and pass off to BIRT as a GET request.

John

Ram wrote:
> Has anyone done this before?
> User wants to enter multiple values or select multiple values from a
> drop down box. I can change the SQL query to use the IN operator-
> something like "ColumnA in (list of values)". How do I link the multiple
> list of the values in the WHERE clause to the user selections?
> Any suggestions?
Re: Parameter and SQL Query question. [message #208799 is a reply to message #208503] Tue, 02 January 2007 22:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ramm.mvmills.com

Thanks John. I was thinking about something along those lines. But
wondered if there was an easier way.


John Ward wrote:
> Ram,
>
> There are several ways to do this. In the default BIRT viewer, you can
> set the parameter to be comma delimited (or whatever), then override the
> fetch method for the dataset and get a result set for each value, or you
> can just create a dynamic query as outlined in the Birt Helpfile (BIRT
> Field Guide to Reporting/Retrieving Data/How to define a dynamic query).
>
> If you want a multi-select listbox or combo-box, you will need to use an
> external form to get that data. You can then use your application server
> to parse the paraemters and pass off to BIRT as a GET request.
>
> John
>
> Ram wrote:
>> Has anyone done this before?
>> User wants to enter multiple values or select multiple values from a
>> drop down box. I can change the SQL query to use the IN operator-
>> something like "ColumnA in (list of values)". How do I link the
>> multiple list of the values in the WHERE clause to the user selections?
>> Any suggestions?
Re: Parameter and SQL Query question. [message #210844 is a reply to message #208503] Thu, 11 January 2007 13:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: harikrishnan.yahoo.co.in

Sir,


I tried creating dynamic query for passing Multiple Values to
Single Parameter as told by you ,but i am unable to do so,

My query is

"select custname from customer where custname in '"+params["cusname"]+"'"

and you had said another way, that is set the Parameter to be comma
delimited,
how to make a Parameter to be comma delimited ?,if you elaborate this way
further it will be useful for me,
I struck up with this problem for quite some time.


Thankyou
Harikrishnan J.
Re: Parameter and SQL Query question. [message #210868 is a reply to message #210844] Thu, 11 January 2007 14:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: xxx.xxx.com

Hi there,

I think what john means by comma delimited parameters is to have the user
enter the multiple values for a parameter by seperating them with
columns.Otherwise there is no other way to accomplish multiple values for
a parameter if you are using the BIRT Viewer.
Re: Parameter and SQL Query question. [message #213634 is a reply to message #210868] Wed, 24 January 2007 06:55 Go to previous message
Eclipse UserFriend
Originally posted by: priya2u_priya.yahoo.co.in

Hi,
Anybody have solution for this

Thanks
Priya
Previous Topic:Selecting specific columns for printing to CSV
Next Topic:Nested name space problem in libraries.. :-(
Goto Forum:
  


Current Time: Fri May 09 11:59:35 EDT 2025

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

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

Back to the top