Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Conditional Formatting Post Reply Post New Topic
Author Message
dsr58
Newbie
Newbie
Avatar

Joined: 23 Apr 2014
Location: United States
Online Status: Offline
Posts: 8
Quote dsr58 Replybullet Topic: Conditional Formatting
    Posted: 23 Apr 2014 at 6:59am
Very new to Crystal Reports 2013
Please forgive my ignorance in advance - I need to change font color of a specific record based on information found in another record. Something like this:

Column 1 Column 2
x1          75
x2          74
x3          72
x4          75
x5          75
x6          72


Column 1 Column 2
x1          72
x2          74
x3          72
x4          75
x5          75
x6          72

x1 Column 1 and 2 are the criteria that formatting is based on. If any other record in Column 2 equals the same at Column 2 for record x1, then the formatting would be the same (bold, red). If x1 - Column 2 changes, then the formatting and the number is no longer the same, the formatting would return to the default and another record that now matches x1-Column 2 would take on the formatting. I work with large groups of data that need to have indicators that match specific criteria and is able to change when the data changes.

I hope I am making sense. I have tried to use a formula without success and the highlighting expert doesn't work this way. Any help would be greatly appreciated. [IMG]smileys/smiley5.gif" align="middle" /> x1 75x4, x5, 75

Edited by dsr58 - 23 Apr 2014 at 6:59am
dsr58
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Apr 2014 at 9:44am
I would create a shared variable to track the value in column2. if this is report wide, it will be easier...but let's suppose it is by group, and that the values are >= 0.

here is what i would do:
in group header a formula like:
shared numbervar col2 := {table.field}

then in details, for the cell to be formatted, in the font tab x-2 button:
shared numbervar col2;
if {table.field} = col2 then
crRed
else
crBlack

similar for bold
shared numbervar col2;
if {table.field} = col2 then
crBold
else
crNormal


IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.