printing long rtf

ManelManel Barcelona, Catalonia
edited 10:37AM in FastReport 3.0
Hi all,

I have to disign a repot wich must show a long rtf (40 pages, more or less). I must show a page header and a page footer that are not in the rtf too.
Becaouse the document may change frequentlly and I don't want to modify the report each time, I think the best way is loading the document into a TfrxRichView at run time, but I have 2 questions:
- The only way it seems to be to load the contents from a file is LoadFromStream.... but when I do this, I get an exception whith the text "invalid file format". Is there any other way to do this? I use next code:
var
  str: TFileStream;
  View: TfrxRichView;
begin
  str := TFileStream.create('a.rtf');
  View.LoadFromStream(str);
  str.Free;
end;

-In the other hand, if I load the content at design time, the report only whow the frist page, so I have to creat manually one report page per document page an copy - paste the content... is there any way to force FR to create automatically each page depending on the document length?

Comments

  • edited 10:37AM
    1) View.RichEdit.LoadFromStream(str)
    2) put the Rich object on a band and set Rich.Stretretched to true and Band.Stretched and Band.AllowSplit to True.
  • ManelManel Barcelona, Catalonia
    edited 10:37AM
    Tks AlexTZ,

    TFrxRichView dosen't have a Strechet property.. I've tried with al the possibilities in StrechMode, but th report alway sows only one page. Memo is in a MasterData Band, set to true both AllowSplit and Streched properties..... any idea?

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.