Skip to Content
avatar image
Former Member

changing the color of a row in Crosstab of crystal report

I have designed crystal report which contains a Crosstab in it and works fine. one of the fields is Time. I want to the whole row color font be changed for the Max Hour which I pass to the report . I can change just the color of the MaxHour Cell but the whole Row. like the following:

the Code is :

if(CurrentFieldValue={?MaxHour}) then

crteal
else

crmaroon

I have set it when I right click of the Time filed, format Object, and then Font. what should I do for changing the color of the whole row of Max Time?

Thank you

crosstab.jpg (177.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 06, 2017 at 09:06 AM

    Hi Nooshin,

    Right-click one of the summary cells > Format field > Font tab > Click the formula button beside Color and use this code:

    if GridLabelAt("Row Field", CurrentRowIndex) = {?MaxHour} then crTeal else crMaroon

    Replace "Row Field" with the field you've used as the Crosstab Row. The field should be enclosed in double-quotes like the way I have above.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded