Skip to Content
avatar image
Former Member

Alternating Row colors on a Crosstab Report

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

cr.png (108.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Jan 31 at 06:40 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 01 at 08:52 AM

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

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 01 at 01:33 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • avatar image
    Former Member
    Feb 01 at 05:27 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 07 at 09:09 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 01 at 05:28 PM

    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

    Add comment
    10|10000 characters needed characters exceeded