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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

conditional format of row data value

Status
Not open for further replies.

mart10

MIS
Nov 2, 2007
394
GB
I am using CR 2016

How can I make a field at record level change font colour if its value has changed from previous row value( in detail level) I should also say its ONLY the change in a detail row with any groupings I have

eg
y
1
1
1
1
2 - to show red fornt
2
x
1
1


ie row value - last row value (within group) not equal zero then highlighlight
 
You could set up a formula in the field Format Editor (Font tab). Something like: if previous({someField}) <> {someField}) the crred else crblack.
 
This doesn't quite work Im afraid It works across the rows within groups but as per my example above showing group y and group x I don't want it to do this across all rows just within the rows within each group

 
The other way is to set up formulas to capture the 'previous' value and then compare it to the current value, resetting on the group level.

Thus at the Group Header (GH)

Shared numbervar somevar := {fieldvalue};

At the detail level in the font tab for the field

Shared numbervar somevar;
if somevar <> {fieldvalue} then crRed else crBlack

Code not tested, but pretty sure it will work.
 
sorry but that didnt work either in fact it was worse!
 
Use Excel instead.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
If not onfirstrecord and
{table.field}<>previous({table.field}) and
{table.groupfield}=previous({table.groupfield}) then
CrRed else
CrNocolor

-LB
 
Hi LB, you seem to know what to do but was bit confused on what you want me to do and where. Sorry to be a pain but could you elaborate

Thanks

PS - SVought - er Excel is NOT an option or auditable! :)
 
Use this formula in the format field->font color->x+2 formula area.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top