Problem with TfrxRichView

edited 11:53PM 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 11:53PM
    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 11:53PM
    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 11:53PM
    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

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.