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!

Works for Signle choice not for multiple choice

Status
Not open for further replies.

ashishh

Programmer
Jul 19, 2002
43
0
0
US
I have the following situation.

I have two prompts

1. Emp_Name - Pick Employee Name
This list comes from picklist report
2. Emp_Type - Pick the Employee Type
Choice are "Creater" or "Owner". It is typed in.

My data is like the following
Record Number Record_Creator Record_Owner
1 John Smith John Smith
2. John Smith John Smith2

In the filter condition, I would like to to the following

If ?Emp_Type = 'Creater" Then
Record_Creator IN ?Emp_Name
Else
Record_Owner IN ?Emp_Name

I was not able to do this in Filter condition. It only lets me do this the following way

IF (?Emp_Name = 'Creator' then Record_Creator)
else (Record_Owner)
= ?Emp_Name

It does not let me have IN operator.

Any suggestions?

Thanks,
Ashish
 
Ashishh,

Try this in your filter:

1 = If ('Creator' IN (?Emp_Name?)) then (1) Else if Record_Creator IN (?Emp_Name?)) then (1) Else (0) ...

This should allow the use of multiple selections in your prompt.

If you are on Oracle, I would try doing the same with a Decode statement.

Hope this helps,

Dave Griffin





The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ20-2863 first!
 
Thanks Dave for your reply. It did work. I appreciate your time and effort.

Thanks,
Ashish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top