Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Color not working...

edited March 2009 in General
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;

Comments

  • edited March 2009
    > Hello, kind of new to RAP and Delphi. Making little strides every day but

    fyi... there's a rap newsgroup


    what even are you assigning the values in? Should be in BeforePrint of the
    band or the object.
This discussion has been closed.