Font attributes in a script

BJLBJL Brussels, Belgium
edited 12:25AM in FastReport 2.xx VCL
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 12:25AM
    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 12:25AM
    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 12:25AM
    Have no idea why missing,
    When setting font properties use fsRegular to go back to normal.
    ;)

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.