RichView Stack Overflow if more than 1 page

edited May 2012 in FastReport 4.0
Hi @all,
im using Delphi XE2 with FastReport V4.12.2 and I got a problem.

I'm building a report to print the content of a TRichEdit. I use no database. So I create a report with a PageHeader-band containing static text (frxMemoView) with date time variables and a frxLineView. I also have a PageFooter-band with a page number. Between these I try to print a frxRichView. I use a Child-band and place my RichView on it.
My propertys are as follows:
PageHeader Child is the Child-band
In Child-Band AllowSplit is set to true and Streched is set to true. All others are leaved by default
In RichView Align is set to baWidth, AllowExpressions is set to false, ShiftMode is set to smAlways and StretchMode is set to smMaxHeight

If my understanding is right, this should force the RichView content to be printed on a new page if it's too long for one page.

In Delphi i use the BeforePrint event to transfer the content of my TRichEdit to the frxRichView
  if Sender.Name = 'Rich1' then
  begin
    Stream := TMemoryStream.Create;
    try
      TempFile := GetTempFile;
      LogText.Lines.SaveToFile(TempFile);
      Stream.LoadFromFile(TempFile);
      SetLength(Str, Stream.Size);
      Stream.Read(Str[1], Stream.Size);
      TfrxRichView(Sender).RichEdit.Text := Str;
      if FileExists(TempFile) then
        DeleteFile(TempFile);
    finally
      Stream.Free;
    end;
  end;

The TRichEdit contains only plain text, no images or other stuff.

And now the error: if there is only content for 1 page to print then everything works fine on LogReport.PrepareReport. But when the text is longer and therefore more than 1 page is to be printed on LogReport.PrepareReport the application seems to hung for about 1 minute and then I get an error stack overflow.

Can anyone help me? What am I doing wrong? I think my propertys are all set correct. May be a bug in fastreport?
Thanks in advance
Ronny
(Sorry for my english, ma native language is german)

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 2:27PM
    try using a masterdataband in place of the child band. set it"s rowcount property to 1 record.

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.