Help with color change formula

Printed From: Crystal Reports Book — Forum Name: Technical Questions

Hello,

I am using the formula below to change the font color when a field is lower case. It works, but only when the entire field is lower case. I need this to work even if the field contains only one lower case.

Any help much appreciated.

if instr(lowercase({table.field}),{table.field},0)= 1 then crred else crblack
When you have to perform case-sensitive comparisons, I think the StrCmp function is the most appropriate:

If StrCmp({table.field}, UpperCase({table.field})) = 0 Then
    crBlack
Else
     crRed