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

If, Then, Else help

Status
Not open for further replies.

TomSal

Programmer
Oct 3, 2008
1
US
I am trying to do something here and hit a wall. I need to do something like this.

If
(expression = 1)

then

(expression = 1)

Else

(' ')

But how do I get it so the else statement doesn't show up on the report? Should I use a different format or is there a way to do this? The way it is I get my regular if then stuff and a Blank Column header with data from the else expression. I want this to just not show up. I have tried Null and 0 and it will still show on the report.

Thanks
 
IF THEN ELSE will follow the following structure:

IF
<< Evaluation >>
THEN
<< Expression >>
ELSE
<< Expression >>

This logical construct will ALWAYS return a value, be it the result of the expression or what is defined in the ELSe part.
In other words there is no way NOT to return a value from the IF THEN ELSE.

If you want to hide information, then cognos offers conditional variables. The Boolean type can be used to hide a column based on the outcome of the IF THEN ELSE

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top