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 10:36PM
    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 10:36PM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.