Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: cross tab formatting Post Reply Post New Topic
Author Message
njahnavi
Newbie
Newbie
Avatar

Joined: 19 Feb 2009
Location: United States
Online Status: Offline
Posts: 5
Quote njahnavi Replybullet Topic: cross tab formatting
     Posted: 19 Feb 2009 at 4:58pm
I am using crystal reports version xi release 2

In my cross tab i have two summary fields like this
1)sum of @TotalTrailerCnt
2)Max of @TotalInvCnt.

I want my cross tab to compare these sums and highlight the first one if it is less than the second. i.e.

if sum of @TotalTrailerCnt < Max of @TotalInvCnt then
highlight sum of @TotalTrailerCnt with yellow color..

any help is greatly appreciated.
IP IP Logged
kkcsrao
Newbie
Newbie
Avatar

Joined: 19 Mar 2008
Location: India
Online Status: Offline
Posts: 15
Quote kkcsrao Replybullet Posted: 19 Feb 2009 at 11:41pm
Hi,
U can go to the format tab of the column, which u want to highlight.
Go to the Font tab. Select the Colour (X+2) formula and type in ur condition, with the color as CRyellow if the condition is true else the normal CRBlack.
 
Hope this helps
kc
IP IP Logged
njahnavi
Newbie
Newbie
Avatar

Joined: 19 Feb 2009
Location: United States
Online Status: Offline
Posts: 5
Quote njahnavi Replybullet Posted: 24 Feb 2009 at 3:49pm
we can do that however the issue is how to write the conditon in the formula...

Anyway I have got answer from another post i would liek to share it with you guys if some one has the same problem and if they come across this forum that will help thme..

The solution which i got from another post is as below

You can do this if you reverse the order of the summaries. The highlighted summary must be the second one.

In preview mode, select the first summary->right click->format field->suppress->x+2 and enter:

whileprintingrecords;
numbervar first := currentfieldvalue;
false

Select the second summary->right click->format field->suppress->x+2 and enter:

whileprintingrecords;
numbervar sec := currentfieldvalue;
false

Then with the second summary still selected->format field->border->color->background->x+2 and enter:

whileprintingrecords;
numbervar first;
numbervar sec;
if sec < first then
crYellow else
crNocolor
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum