font.color change by Value

hi

I??m tryng to put to work the code below but nothing what is the problem?

Thanks


procedure MasterData4OnBeforePrint(Sender: TfrxComponent);
begin
if <Termografia_sub."GrauAnomalia">='1' then Termografia_subGrauAnomalia1.font.color:=clNavy

else if<Termografia_sub."GrauAnomalia">='2' then Termografia_subGrauAnomalia.font.color:=clMaroon

else if <Termografia_sub."GrauAnomalia">='3' then Termografia_subGrauAnomalia.font.color:=clRed

//else Termografia_subGrauAnomalia.font.color:=clNone

end;

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 6:27PM
    either your expression does not evaluate to true( numeric instead of string) or you are referencing the wrong memoview.
    BTW please don't double post
  • Anu de DeusAnu de Deus Hampshire, UK
    edited 6:27PM
    Try debugging it by putting either

    <!--fonto:Courier New--><span style='font-family: "Courier New"'><!--/fonto-->Termografia_subGrauAnomalia1.text := <Termografia_sub."GrauAnomalia">;<!--fontc--></span><!--/fontc-->

    or

    <!--fonto:Courier New--><span style='font-family: "Courier New"'><!--/fonto-->showmessage(<Termografia_sub."GrauAnomalia">);<!--fontc--></span><!--/fontc-->


    to see what's the value

Leave a Comment