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

Pagestyle and RTF

edited June 2002 in General
Hi DM,

on a pagestyle band i have a TppRichText object. The problem is that the
richtext component doesn't consider the stretch property.
So i have manually set this richtext to the possible maximum height (round
about 15 cm on A4). I need this feature for Jim's PDF-Device, otherwise the
report needs round about 1 minute to render if there is a lot of white
space.

Is set the richtext content in RAP in a PageStyle.BeforeGenerate /
BeforePrint event.

Something i missed?!?

Greetings
Sven

Comments

  • edited June 2002
    It stretches in tests here using the BeforePrint event. Are you using the
    RichText.LoadFromFile method?


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited June 2002
    No,

    i' am using RichText1.RichText := 'Some text here';

    Greetings
    Sven


  • edited June 2002
    Looks like it stretches if you use the LoadFromFile method, but if you set
    the RichText property it doesn't stretch. There is something that is
    causing the pagestyle print height to get set back to static. You can set
    the PageStyle.PrintHeight back to static after setting the rich text and it
    should begin working. Thanks for reporting this.

    uses
    ppTypes;

    procedure TForm1.ppPageStyle1BeforePrint(Sender: TObject);
    var
    lRichText: TStringList;
    begin

    lRichText := TStringList.Create;
    lRichText.LoadFromFile('C:\Program
    Files\Borland\Delphi6\RBuilder\Release.doc');

    ppRichText1.RichText := lRichText.Text;

    lRichText.Free;

    ppPageStyle1.PrintHeight := phDynamic;

    end;




    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.