Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Help with color change formula Post Reply Post New Topic
Author Message
belfane
Newbie
Newbie


Joined: 18 Apr 2013
Online Status: Offline
Posts: 21
Quote belfane Replybullet Topic: Help with color change formula
    Posted: 16 May 2016 at 3:29am
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
IP IP Logged
Valert16
Groupie
Groupie
Avatar

Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
Quote Valert16 Replybullet Posted: 26 May 2016 at 6:41am
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
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.