Joined: 23 Apr 2014
Location: United States
Online Status: Offline
Posts: 8
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:
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
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
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
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