cancel
Showing results for 
Search instead for 
Did you mean: 

Alternating Row colors on a Crosstab Report

Former Member
0 Kudos

Hi I have created a crystal crosstab Report With two Rows(propid, RoomType0 and two columns(date and weekday) and 5 summerized feilds. I want to have alternate Row Shading but I am facing issues where it is not shading correctly for some rows and shading correctly for some of them.

Below is the formula code I have tried:

On RoomTypeRow: NumberVar Rownum; Rownum := Rownum + 1; If Rownum MOD 2 = 0 then crSilver Else crWhite

On Summerized feild(Availableroom,totalroom etc.,) : numbervar r1:= r1 + 1; if remainder(r1,2) = 1 then CRWhite else CRSilver

On column data : IF Remainder (CurrentRowIndex, 2) <> 0 THEN CRSilver ELSE crWhite

Can someone please let me know if i need to change anything?

Thanks

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

It is not working. This is what I see now .

abhilash_kumar
Active Contributor
0 Kudos

Please attach the report with saved data.

You may attach it to Google drive or another file sharing app and share the URL here.

-Abhilash

Former Member
0 Kudos

It is still not working. This is what i am getting now.

Former Member
0 Kudos

After Right-clicking the RoomTypeRow field > Format Field > Border>Click the formula button beside and use this code:

shared numbervar x;x:=x+1;
false

I am getting this error: A number or currency amount is required.

abhilash_kumar
Active Contributor
0 Kudos

Hi Vinisha,

Right-click the RoomTypeRow field > Format Field > Click the formula button beside "Suppress" and use this code:

shared numbervar x;
x:=x+1;
false

-Abhilash

abhilash_kumar
Active Contributor
0 Kudos

1. Right-click the RoomTypeRow field > Format Field > Click the formula button beside and use this code:

-Abhilash

abhilash_kumar
Active Contributor
0 Kudos

Hi Vinisha,

1. Right-click the RoomTypeRow field > Format Field > Click the formula button beside and use this code:

shared numbervar x; 
x := x+1;
false

2. Right-click the RoomTypeRow field > Format Field > Border tab > Click the formula button beside 'Background' and use this code:

shared numbervar x; 
if remainder(x,2) = 0 then crSilver
else crNoColor

3. Use the same background shading formula on PropID Row as well as the Summarized field.

-Abhilash