How to collor alternate rows on crosstabs – Crystal Reports

1) Right-click the Row > Format field > Border tab > Click on the formula button beside ‘Background’ and use this formula:

numbervar row;row := iif(row=1,0,1);iif(row=0,color(197,217,244),color(255,220,255))

2) Next, right-click the Column > Format field > Border tab > Click on the formula button beside ‘Background’ and use this formula:

numbervar col;col := iif(col=1,0,1);iif(col=0,color(197,217,244),color(255,220,255))

3) Then, right-click the Summary Field > Format field > Border tab > Click on the formula button beside ‘Background’ and use this formula:

numbervar sumr;sumr := iif(sumr=1,0,1);iif(sumr=0,color(197,217,244),color(255,220,255))

Please note that the above formulas will only shade the ‘cell’ and not the entire text field of the crosstab. The reason being the cell that you’re referring to is made up of a normal text field and margins on the top, left, right and bottom.

You would need to get rid of the cell margins completely and that is the only way around.

So, right-click the cross-tab in the Preview mode and go to Grid-options > uncheck ‘cell margins’.

Could you change all the formula to:

If Remainder (CurrentRowIndex, 2) <> 0

then color(197,217,244)

else color(255,220,255)

Oftenly translators don’t work, I know better than anyone, you may believe me! Anyway, it may help you a lot if you’re a VB .NET developer and find some C# uninteligible code necessary work you to translate

C# to VB .NET Converter https://converter.telerik.com/

Thoughts are free

Die Gedanken sind frei

Die Gedanken sind frei,
wer kann sie erraten?
sie fliehen vorbei,
wie nächtliche Schatten.
Kein Mensch kann sie wissen,
kein Jäger erschießen.
Es bleibet dabei!
Die Gedanken sind frei.

Ich denke, was ich will,
und was mich beglücket,
doch alles in der Still,
und wie es sich schicket.
Mein Wunsch und Begehren
kann niemand verwehren,
es bleibet dabei!
die Gedanken sind frei.

Ich liebe den Wein,
mein Mädchen vor allen,
sie tut mir allein
am besten gefallen.
Ich bin nicht alleine
bei meinem Glas Weine,
mein Mädchen dabei,
die Gedanken sind frei.

Und sperrt man mich ein
im finsteren Kerker,
das alles sind rein
vergebliche Werke;
denn meine Gedanken
zerreißen die Schranken
und Mauern entzwei
die Gedanken sind frei.

Drum will ich auf immer
den Sorgen entsagen
und will mich auch nimmer
mit Grillen mehr plagen.
Man kann ja im Herzen
stets lachen und scherzen
und denken dabei:
die Gedanken sind frei!