RichView Stack Overflow if more than 1 page
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
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)
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