COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: hrjanardhan on 27 May 2016 12:47:00 AM

Title: mod() finction throws an error in Conditional Stlye
Post by: hrjanardhan on 27 May 2016 12:47:00 AM
Using Cognos 10.2.2. I'm trying to achieve alternate row color by using mod(RowNumber(), 2) = 0. But it throws this error.
RSV-VAL-0034 Failed to validate variable Conditional Style 1
CRX-YXX-4010 Parsing error.

While I have used the same logic successfully in other of my reports, I am getting this error in some of the reports.
Title: Re: mod() finction throws an error in Conditional Stlye
Post by: Mfg on 27 May 2016 02:49:38 AM
QuoteUsing Cognos 10.2.2. I'm trying to achieve alternate row color by using mod(RowNumber(), 2) = 0. But it throws this error.
RSV-VAL-0034 Failed to validate variable Conditional Style 1
CRX-YXX-4010 Parsing error.

While I have used the same logic successfully in other of my reports, I am getting this error in some of the reports.

if i am not wrong try to put the expression in a data item(say MOD) and add it to the property of the data container(Say List) you are using or add it to the property of a data item(if you are using crosstab).Drag the data item to the variable expression definition instead of giving the whole expression in the variable itself.
Title: Re: mod() function throws an error in Conditional Stlye
Post by: hrjanardhan on 27 Jun 2016 11:49:00 PM
Using the mod function itself throws an error wherever I use it.
Title: Re: mod() function throws an error in Conditional Stlye
Post by: MFGF on 04 Jul 2016 06:43:11 AM
Quote from: hrjanardhan on 27 Jun 2016 11:49:00 PM
Using the mod function itself throws an error wherever I use it.

Is the issue where you use mod() - a Cognos function - with Rownumber()? Have you tried replacing Rownumber() with a running-count?

MF.