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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Select

Status
Not open for further replies.

TEM3

Technical User
Dec 6, 2004
324
US
Using CR 8.5:

I want to user to be able to see one department ({Department Code}) or all departments (by entering "ALL" in the parameter).

This formula (in the select expert box) does not work.

{LABITEM.Location} = uppercase({?Analyst}) and
{LABITEM.Lab Item Number} <> "0" and
(if uppercase({?UnitCode}) <> "ALL" then
trim({LABCASE.Department Code}) = uppercase({?UnitCode}))

Can this be done (or is there another way to do it)??
 
I don't follow. Surely
Code:
@param = "ALL" or @param = trim({LABCASE.Department Code})
Or similar.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
It should be:

{LABITEM.Location} = uppercase({?Analyst}) and
{LABITEM.Lab Item Number} <> "0" and
(
if uppercase({?UnitCode}) <> "ALL" then
trim({LABCASE.Department Code}) = uppercase({?UnitCode}) else
if uppercase({?UnitCode}) = "ALL" then true
)

You have to enter "ALL" as one of your default options in the parameter setup screen.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top