Color not working...
Hello, kind of new to RAP and Delphi. Making little strides every day but
kind of stuck as to why this won't change the color to red. The value shows
up fine...
Also, there must be a way to tighten up this code and not have repeating...
but I don't know it. The Column_One is type Double. Any help?:
begin
Value := ExTable['Column_One'] / (ExTable['Column_Two'] * -1);
if (Value > 1.7)
then begin
Variable.font.color := clGreen;
end;
if (Value >= 1.25) and (Value <= 1.7)
then begin
Variable.font.color := clYellow;
end;
if (Value < 1.25)
then begin
Variable.font.color := clRed;
end;
end;
kind of stuck as to why this won't change the color to red. The value shows
up fine...
Also, there must be a way to tighten up this code and not have repeating...
but I don't know it. The Column_One is type Double. Any help?:
begin
Value := ExTable['Column_One'] / (ExTable['Column_Two'] * -1);
if (Value > 1.7)
then begin
Variable.font.color := clGreen;
end;
if (Value >= 1.25) and (Value <= 1.7)
then begin
Variable.font.color := clYellow;
end;
if (Value < 1.25)
then begin
Variable.font.color := clRed;
end;
end;
This discussion has been closed.
Comments
fyi... there's a rap newsgroup
what even are you assigning the values in? Should be in BeforePrint of the
band or the object.