COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: lifzgud on 03 Sep 2009 11:33:15 PM

Title: How to use MOD
Post by: lifzgud on 03 Sep 2009 11:33:15 PM
Can anybody please tell me how to use MOD in cognos report studio expression
Title: Re: How to use MOD
Post by: blom0344 on 04 Sep 2009 04:55:59 AM
mod([someindex],2)

yields:

index      result
1           1
2           0
3           1
4           0
5           1
..
..
117        1
118        0

Get the picture?
Title: Re: How to use MOD
Post by: lifzgud on 04 Sep 2009 08:21:00 AM
Yes i have tried this but it throws up an error when i run the report
Title: Re: How to use MOD
Post by: Naven on 04 Sep 2009 09:27:49 AM
Hi,

We have used mod function to show alternate backgorund colors in HTML(list/crosstab) formats.

Expression is  mod(runningcount(),2)  ,  this is defined in boolean variable and list body is rendered accordingly.

Regards,
Naveen
Title: Re: How to use MOD
Post by: lifzgud on 04 Sep 2009 09:30:32 AM
I'm sorry...i messed up the date part in the mod..its working...  thanks guys
Cheers:)