Home » Developer & Programmer » Reports & Discoverer » How to run the report with two ore more values in a user parameter?
How to run the report with two ore more values in a user parameter? [message #269452] Sat, 22 September 2007 07:21 Go to next message
florencekiu
Messages: 2
Registered: September 2007
Junior Member
I'm using Reports 2.5 version.
I define a user parameter called p_no and would like to enter more than one value when running the report. But I found that the parameter only can accept one value (e.g p_no = 17). If I enter two value (e.g p_no = 23,17), it's failed. How can I enter two or more value each time?

SQL statment as follow:
select * from supplier where number in (:p_no);

[Updated on: Sat, 22 September 2007 08:11]

Report message to a moderator

Re: How to run the report with two ore more values in a user parameter? [message #269472 is a reply to message #269452] Sat, 22 September 2007 13:03 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Try to use lexical parameter instead of bind one.

By
Vamsi
Re: How to run the report with two ore more values in a user parameter? [message #269569 is a reply to message #269472] Sun, 23 September 2007 09:52 Go to previous messageGo to next message
florencekiu
Messages: 2
Registered: September 2007
Junior Member

How to use lexical parameter in Oracle Reports 2.5?

Thanks,
florencekiu
Re: How to run the report with two ore more values in a user parameter? [message #269575 is a reply to message #269569] Sun, 23 September 2007 10:47 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Have you searched google?
how about this one?

One of the easy ways to get the answer quickly:
Search first.
Please follow OraFAQ Forum Guide.

Just below you can see another thread on lexical parameters. Have you taken a look? I don't know whether difference in release does matter in this or not.

By
Vamsi

[Updated on: Sun, 23 September 2007 10:52]

Report message to a moderator

Re: How to run the report with two ore more values in a user parameter? [message #269585 is a reply to message #269575] Sun, 23 September 2007 12:04 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Another possiblity is to create two parameters instead of one and rewrite the query so that it looks like
SELECT * FROM supplier
WHERE (number = :p1_no
       OR
       number = :p2_no
      )
Re: How to run the report with two ore more values in a user parameter? [message #269601 is a reply to message #269585] Sun, 23 September 2007 14:32 Go to previous message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Yes, but only works for two values.
We have to define those many parameters as many we want to put them after IN.

Of course, OP was for two only.

By
Vamsi
Previous Topic: Matrix Report
Next Topic: How to create Drill down report in reports 10g ?
Goto Forum:
  


Current Time: Sun Dec 04 14:50:43 CST 2016

Total time taken to generate the page: 0.11345 seconds