Home » Developer & Programmer » Reports & Discoverer » Discoverer Desktop - Optional Parameters
Discoverer Desktop - Optional Parameters [message #158435] Fri, 10 February 2006 16:48 Go to next message
aculrich
Messages: 8
Registered: February 2006
Junior Member
How do you make parameters optional in Discoverer Desktop?

For example, if I do not enter any values in the parameter it will not filter by anything.

Please help! Thanks!

[Updated on: Fri, 10 February 2006 16:55]

Report message to a moderator

Re: Discoverer Desktop - Optional Parameters [message #158452 is a reply to message #158435] Sat, 11 February 2006 06:59 Go to previous message
skooman
Messages: 913
Registered: March 2005
Location: Netherlands
Senior Member
You can't. At least, up to version 9i you can't (I'm not sure about 10g).

Anyhow, although there is no option like "optional" for parameters, you can make it optional yourself. The way to do this, is to create a calculation, which results to "always true" if the user enters a certain value, like * (make sure you put that in the description!).

The steps are:
- create a condition, let's say on emp_name
- add new parameter, fi p_emp
- complete the condition with a calculation like:
decode(:p_emp,'*',emp_name,p_emp)

Explanation:
if the user enters * for the parameter, then the condition is: where emp_name = emp_name (which is obviously always true), if the user enters anything else but *, the condition is: where emp_name = value-entered-in-parameter.

Regards,
Sabine
Previous Topic: Parameter problem in reports
Next Topic: How to delete orphaned folders
Goto Forum:
  


Current Time: Fri Jun 28 00:48:46 CDT 2024