No Page Break in WPTools using ReportBuilder

  • We use WPTools 4.21 and ReportBuilder 7 and the ppWPTools add on.

    When I try to print preview using Reportbuilder it does not show the page breaks correctly.

    When I have the following code :
    paWPRichText.Text := '';
    paWPRichText.InputString('HELLO WORLD PAGE 1');
    paWPRichText.InputString(#12);
    paWPRichText.InputString('HELLO WORLD PAGE 2');
    paWPRichText.InputString(#12);
    paWPRichText.InputString('HELLO WORLD PAGE 3');
    ppMinutes.RichText := paWPRichText.AsString;
    rptMinutes.Print

    you would expect to have at least 3 pages but they all get printed on the one page and the pagebreak ("\page") is lost... Why?

    Please advice.

    (Posted this question to the wrong group "FAQ" first, Sorry)

    • Offizieller Beitrag

    Pagebreaks did not work in the ReportBuilder support units.

    I have now changed the Draw() function for Version 4.22a (just posted) to accept an additional parameter. If this paremetr is true the Draw function will use the complete rectangle if a page break is found.

    So a small change in ppWPTools.PAS makes it possible to have page breaks:

    StartNextLine := RichText.Draw(lMetaFileCanvas, 0, 0, Round(Height * TwipsPerMMThousend), StartLine, 0,
    true // requires WPTools V4.22
    );