Problem with TfrxRichView

edited 6:39AM in FastReport 4.0
I would like to implement a report with a pagehead, pagefoot and main part (content).
And I TFrxRichView wants to use it as RTF files and images with a frame is.

PageHeader
Masterband (Master Data or similar)
PageFooter

My Code:

Procedure Tform1.button1click(Sender: TObject);
begin
TfrxRichview(frxReport1.FindObject('richheader')).RichEdit.Lines.LoadFromFile('jmhead.rtf');
TfrxRichview(frxReport1.FindObject('richhaupt')).RichEdit.Lines.LoadFromFile('jmhaupt.rtf');
TfrxRichview(frxReport1.FindObject('richfooter')).RichEdit.Lines.LoadFromFile('jmfoot.rtf');

frxReport1.ShowReport();
end;


Properly displayed pagehead and pagefoot with contents of the RTF file.
The master tape with the main content is not displayed.

TFrxRichView "richhaupt" without a master data is shown, but on whole page and with no line breaks (new page).

Please help, I will not continue.

Best Regards

Jm12

Comments

  • edited 6:39AM
    What do you mean it does not show, The MasterData Band does not show Data from Database ? or some part (image/Text) from the RTF not showing ? >
  • edited 6:39AM
    Jm12 wrote: »
    I would like to implement a report with a pagehead, pagefoot and main part (content).
    And I TFrxRichView wants to use it as RTF files and images with a frame is.

    PageHeader
    Masterband (Master Data or similar)
    PageFooter

    My Code:

    Procedure Tform1.button1click(Sender: TObject);
    begin
    TfrxRichview(frxReport1.FindObject('richheader')).RichEdit.Lines.LoadFromFile('jmhead.rtf');
    TfrxRichview(frxReport1.FindObject('richhaupt')).RichEdit.Lines.LoadFromFile('jmhaupt.rtf');
    TfrxRichview(frxReport1.FindObject('richfooter')).RichEdit.Lines.LoadFromFile('jmfoot.rtf');

    frxReport1.ShowReport();
    end;


    Properly displayed pagehead and pagefoot with contents of the RTF file.
    The master tape with the main content is not displayed.

    TFrxRichView "richhaupt" without a master data is shown, but on whole page and with no line breaks (new page).

    Please help, I will not continue.

    Best Regards

    Jm12

    Place the TFrxRichView into a MAsterdata. Then set the record count of the masterdata to 1 (right click and edit) and the stretched property to true.

    This should solve your problem. >
  • gordkgordk St.Catherines On. Canada.
    edited 6:39AM
    the master data must have a dataset or be set up as previously mentioned.
    the masterdaband must be set to stretch and allowsplit, the tfrxrichview must have it's stretch mode set correctly.

Leave a Comment