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

Conditional Formatting

Status
Not open for further replies.

fragglemoo

IS-IT--Management
Nov 20, 2002
41
0
0
GB
CR2008

I have a report that is grouped and one of the fields is a date/time field. The values in this field should all be the same but occasionally they are incorrect and I want to highlight these in red. I have been able to partially do this using

If ({Command.Promotion to Production}) <> Previous (({Command.Promotion to Production}))
Then
red
else if
({Command.Promotion to Production}) = (({Command.Promotion to Production})) then black

However this ignores the fact that the report is grouped and produces.

Group1
16/8/08
16/8/08
16/9/08

Group2
28/8/08

How do I do this by group?

Thanks.
 
Try this:

If remainder(groupnumber,2)=0 then red else defaultattribute

This will make the even groups red. If you want odd groups to be red change the remainder() function's 2nd argument to 1.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Thanks for coming back to me but I may not have explained what I am trying to do very well. Sorry :(

What I'm trying to do is highlight "data entry" errors. The dates in each group should be indentical so what I am trying to do is highlight in red any date that is not the same as the others in the group.

Group1
16/8/08
16/8/08
16/9/08
Group2
28/8/08
28/8/08
17/8/08
28/8/08

Group3

17/09/08
17/09/08
17/8/08

Does this make more sense?
 
Using summary totals Maximum or Minimum, you could highlight the date or dates that are earlier / later for a group.(If you're not already familiar with Crystal's automated totals, see FAQ767-6524.) But I can't see how you could use this to find the 'odd one out', especially if you want it to do this at the same time as it prints.

What you could do is have a little crosstab at group footer level, suppressing it if the maximum and minimum are the same. Put date in the 'columns' and have something that doesn't vary for 'row'. It would highlight the differences.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
How do you know which date is the correct date in a group?

-LB
 
lbass - good question! I never thought of that DOH!

I'll ask the managers who requested this.
 
I've just been advised that we are looking for anomalies. There may be 300 same dates in a group and 1 different one and they would like to be able to highlight this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top