Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cross tab formatting 1

Status
Not open for further replies.

njahnavi

Technical User
Dec 29, 2008
136
US
I am using crystal reports version xi release 2

In my cross tab i have two summary fields like this
sum of @TotalTrailerCnt
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.

 
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

-LB

 
I did exactly what you said and it worked like a charm...
I almost lost the hopes when i couldnt get it and after seeing the gridvalueat function for crystal 2008 in internet i was like " gone i cant do this report any ,more"

you saved my day LB.

I am really so glad that you helped me..
I am so glad because of you...
I am not sure how can i thank you LB...I wish i can give more and more stars...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top