COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cognos.cognosbi@gmail.com on 19 Oct 2011 01:24:01 AM

Title: conditionally show the values
Post by: cognos.cognosbi@gmail.com on 19 Oct 2011 01:24:01 AM
Hi,

i have a list with values 1,2,3,4,5,6 like this.my requirement is if select in prompt we should show only even values.if i select odd show odd values only.how can achieve this.

Thanks And Regards
Cool Cognos.
Title: Re: conditionally show the values
Post by: MFGF on 19 Oct 2011 08:22:43 AM
You could drive a boolean variable using an expression utilising the mod() function (which returns the remainder of a division)

Your expression could be   mod([value],2) = 0

This will be true for even values and false for odd values, and you can use this to conditionally show or hide the values, depending on how your prompt is set.

Regards,

MF.
Title: Re: conditionally show the values
Post by: cognos.cognosbi@gmail.com on 20 Oct 2011 12:12:02 AM
Thanks MFGF....