COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Ann on 04 Jan 2012 11:40:04 PM

Title: string variable vs boolean variable
Post by: Ann on 04 Jan 2012 11:40:04 PM
Hi Guys,

Here is my query:

I have a string variable with four values and rendering four crosstabs using it.
Same thing i can implement using four boolean variable checking for respective four values.

Now i want to know which one is a better solution in terms of performance ?
Title: Re: string variable vs boolean variable
Post by: MFGF on 05 Jan 2012 04:38:56 AM
The string variable will stop evaluating once it finds a True result, so if you code it with the test most likely to succeed at the beginning, it should be more efficient than always evaluating four boolean checks.

Regards,

MF.
Title: Re: string variable vs boolean variable
Post by: Ann on 11 Jan 2012 05:15:52 AM
Thanks for the input. :)