cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports - Shade alternate "groups" of detail rows

Former Member
0 Kudos
4,705

I'm creating a report that requires a rather complex Alternate Row Shading routine.  Consider the following output:

I need to create an alternate row shading routine that produces what is shown in the image above. The alternate shading formula needs to shade a variable number of rows, depending upon how many different boxes (LPNs) the quantities of each Item were picked to.

The first 4 columns are set to suppress duplicate values, based on the OrdRow value. As a result of the fields being suppressed, the 2nd row below 104, for example, is evaluated as different from the first row--even though if it wasn't supressed, the OrdRow column would be the same.

I will appreciate any direction you can give.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor

Hi Randy,

1) Insert a group on the OrdNo field

2) Suppress the Group Header and Group Footer sections

3) Go to the Section Expert > Highlight the Details section > Color tab > Click the formula button beside 'Color' and use this code:

if remainder(GroupNumber, 2) =0 then crNoColor else crSilver

-Abhilash

0 Kudos

Thank you!

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Below SAP note may help you to resolve this.

1216502 - How to alternate background colors for the Details or Group Header sections


Regards,

Mithun

former_member205840
Active Contributor
0 Kudos

Hi Randy,


Go in Section Expert-- Select Detail section-- select color tab and click on formula editor button and give below

if remainder(recordnumber, 2) =0 then crgreen else crNoColor

You may change color according to your requirement.

Thanks,

Sastry