Font attributes in a script

BJLBJL Brussels, Belgium
I need to print fields in bold or in normal according to the value of a field

begin
if ([dsR."TI"] = 1) then
begin
MemoCpte.Font.Style := fsBold;
...
end
else if ([dsR."TI"] = 0) then
begin
MemoCpte.Font.Style := 0;
...
end
end

The above script gives correctly the line in bold, but the next line is blank.
Replacing 0 by nil is not accepted.
[] is not accepted.
Saving the original style in a variable on the page.obp does not work.

Could you please indicate the way to come back to the normal style?

Thanks in advance.

BJL

Comments

  • BJLBJL Brussels, Belgium
    edited 5:08AM
    I have cancelled the script of the masterdata band and I use the Highlight property of each Memo of the band (2 alphas and 7 numeric).

    I get the same problem. While the bold record is correctly printed, the next non bold shows only the 2 alphas fields, but the 7 numeric fields are blank.

    BJL
  • BJLBJL Brussels, Belgium
    edited 5:08AM
    Further tests show that the missing numbers have nothing to do with the preceding bold record.
    Why these numbers are missing remain unsolved.
  • gordkgordk St.Catherines On. Canada.
    edited 5:08AM
    Have no idea why missing,
    When setting font properties use fsRegular to go back to normal.
    ;)

Leave a Comment