Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ignore Parameter if Null

Status
Not open for further replies.

robbclaxton

IS-IT--Management
Dec 12, 2005
13
GB
I am trying to use a parameter to exclude data from the select, but optionally. If no value is stored in the parameter I want it to show all data. Is this possible?
 
You can set a default eg All or 0.

Then in select

//string
(If {?Param} <> 'All' then {field} = {?Param} else true)
//number
(If {?Param} <> 0 then {field} = {?Param} else true)

Wrapped in () so it can be used with other clauses.

Ian
 
Thanks Ian, It had to be simple else I would've remembered lol!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top