How to allow user to leave non-LOV parameter empty? [message #89033] |
Tue, 05 August 2003 11:14 |
Adrienne
Messages: 6 Registered: August 2003
|
Junior Member |
|
|
I have a report that needs to allow the user to filter by customer. I do not want to create a list-of-values parameter because it would be over 4000 items long, so the user will have to just type in the customer names they want to filter over. Most of the time, though, they will need to run the report for ALL customers.
How can the user run the report without specifying any customer? If they leave the Customer parameter blank, the "Finish" button does not become active, so they can't run the report. If they enter NULL they get no records (because there are no NULL customers). Entering " " (space) and "%" doesn't work either.
Any ideas?
|
|
|
Re: How to allow user to leave non-LOV parameter empty? [message #89043 is a reply to message #89033] |
Sun, 10 August 2003 09:06 |
Muzzammil
Messages: 99 Registered: February 2003
|
Member |
|
|
Hi,
Put this where condition in your query.
WHERE CUSTOMER LIKE decode(:CNAME,'ALL','%',:CNAME)
In CNAME parameter value put initial value as ALL if you are putting ALL in the where condition. Other wise remove this all put ' '.
---CNAME=CUSTOMER NAME
I hope it solve your problem.
Syed Muzzammil
|
|
|
Re: How to allow user to leave non-LOV parameter empty? [message #89051 is a reply to message #89043] |
Mon, 11 August 2003 11:55 |
Adrienne
Messages: 6 Registered: August 2003
|
Junior Member |
|
|
Thank you for the response. I wonder if I am misunderstanding, though.
I am in the Administrator edition, and I added the above code to my SQL query, which is in a Custom Folder inside the relevant business object. But when I click the "Validate SQL" button, I get a popup that says "The custom SQL entered is not a valid SQL statement". If I save it anyway, I can't create a worksheet based on the items in that query.
The SQL statement is valid if I remove that line. What am I missing?
|
|
|