Print Page | Close Window

Alternate Row coloring in Cross tabs

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=10963
Printed Date: 04 May 2024 at 10:24pm


Topic: Alternate Row coloring in Cross tabs
Posted By: thunderball
Subject: Alternate Row coloring in Cross tabs
Date Posted: 26 Aug 2010 at 12:02am
Hi,

I have a report where I need to display alternate rows as colored.
There is some data in detail section followed by a cross tab in the report header section.
While I am able to display alternate rows as colored in Detail secction for displaying alternate colored rows in Cross tab data I need some help.

Data in cross tab is like this
history geography
Tammy 90 60
Sid 80 50
Julia 70 40

In cross tab for displaying alternate colored rows ie for alternate student names I am using two formulas
- for displaying row values I am using this one
whileprintingrecords;
numbervar d;
d := iif(d=100,255,100);
color(255,255,d);

For displaying alternate colored inner cells ie marks I am using this formula
whileprintingrecords;
numbervar c;
c := iif(c =255,100,255);
color(255,255,c)

I got these formulas after doing Googling
My cross tab is present in report footer and in the generated report it comes separeated in two pages.

In the first page data for Tammy and Sid is displayed while Julia is displayed on next page.

Now the Tammy is coming as yellow colored and as expected Sid is coming as white colored. However Julia which is on next page is coming as white , but logically it should have come as yellow. On the other hand my column data ie marks column is coming fine. Data for tammy and sid is coming as alternately colored and data is Julia on the next page is coming as yellow(as data for Sid is in white)

I am not able to understand why this is happening and what is the correct way to do alternate row coloring in cross tabs




Replies:
Posted By: Emir_W
Date Posted: 26 Aug 2010 at 12:19am
you can use 'Highlighting Expert...'.

in here you can set:
- which field to check and with what condition
- what do you want to print/display the field (font, font color, background color, etc.)

to do this:
1. right click the field
2. select 'Highlighting Expert...'


hope it help.



-------------
Emir W



Print Page | Close Window