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

Applying the different filter condition using runtime parameter

Status
Not open for further replies.

rajkati

Programmer
Jul 7, 2004
3
US
Hi

I like to apply the Tabular Filter on the query for displaying all, null and not null values based on the parameter which is static value passed through value prompt.

When I select the static parameter value as 1 it should display records 1 and 3, if value as 2 then display only record 2 and if value as 3 then display all records.

Sample Table Data
=================
iCode Name Code
----- ---- ----
100 abcd 102
101 efgh <nul>
102 aklm 100

Filter Expression:
==================
CASE ?Parameter?
WHEN ('1') THEN (
Code:
 IS NOT NULL) 
WHEN ('2') THEN ([Code] IS NULL) 
ELSE (NULL)
END

But when we validate the expression its giving a parsing error. 
Is there any alternate way to achive this?

Thanks
Raj
 
Raj

It would help if we new what tool you were using, Cognos Impromptu doesn't support Case statements you would have to use If...Then...Else.

If you sre using some other product please let us know, the version number would help as well.

Gary Parker
MIS Data Analyst
Manchester, England
 
Hi Parker

I am using Cognos ReportNet 1.1

Raj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top