Hi everybody I have an issue with a Cr XI report.
I have a formula that looks like this
Numbervar range Lowprofit:=0 to 0.24;
Numbervar range normalprofit:=0.25 to 0.40;
numbervar cpratio:={Profit.Profit}/{Profit.Cost};
Stringvar Message;
if cpratio in lowprofit then message:="Below average " & totext(cpratio,2) else
if cpratio in normalprofit then message:="Average " & totext(cpratio,2) else message:="Above Average " & totext(cpratio,2)
Basically working out profit % from two fields, then adding some test to the result.
This works fine. On this formula field i have tried to add in some conditional formatting like so
whileprintingrecords;
evaluateafter({@Performance});
stringvar message;
stringvar left2:=left(message,2);
if left2 = "Be" then crRed else if left2 = "Av" then crGreen else crBlue
The problem is that all the answers come out green though the data varies. I can't understand why this is.
Can anyone help me?
Cheers
Paul W
I have a formula that looks like this
Numbervar range Lowprofit:=0 to 0.24;
Numbervar range normalprofit:=0.25 to 0.40;
numbervar cpratio:={Profit.Profit}/{Profit.Cost};
Stringvar Message;
if cpratio in lowprofit then message:="Below average " & totext(cpratio,2) else
if cpratio in normalprofit then message:="Average " & totext(cpratio,2) else message:="Above Average " & totext(cpratio,2)
Basically working out profit % from two fields, then adding some test to the result.
This works fine. On this formula field i have tried to add in some conditional formatting like so
whileprintingrecords;
evaluateafter({@Performance});
stringvar message;
stringvar left2:=left(message,2);
if left2 = "Be" then crRed else if left2 = "Av" then crGreen else crBlue
The problem is that all the answers come out green though the data varies. I can't understand why this is.
Can anyone help me?
Cheers
Paul W