COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: dfite on 04 Sep 2007 02:36:44 PM

Title: Can't set variable to read Fact/data item values
Post by: dfite on 04 Sep 2007 02:36:44 PM
I am fairly new, so please forgive if this is a stupid question, but how do you set a variable to reflect the value of a query's fact?  I am trying to conditionally display text based on the contents of a query fact, but the variable always returns a "no" result.  I create a new variable, and set its expression to [TIER]= '3', then create a conditional block and set its Conditional Block preperty to use my new variable and the Current Block property to Yes.  The test never displays, even when the query's TIER fact is equal to 3.  Any ideas?
Title: Re: Can't set variable to read Fact/data item values
Post by: MFGF on 05 Sep 2007 04:41:13 AM
Hi,

Just checking - what kind of variable did you define - Boolean or String?  Assuming it's Boolean, can you check that [Tier] is a character value, not a number (ie that your expression should not be [Tier] = 3)

Just a thought,

MF.
Title: Re: Can't set variable to read Fact/data item values
Post by: COGNOiSe administrator on 05 Sep 2007 07:37:17 AM
Ditto.
Title: Re: Can't set variable to read Fact/data item values
Post by: MDXpressor on 11 Sep 2007 09:47:40 AM
Additionally, if it is a String Variable, you need to define the values you are going to use to the list of values in the Variable Explorer.