TFrxPreview : LoadFromStream

edited August 2005 in FastReport 3.0
Hello,

Is it possible to handle this method ?.
I just found TFrxPreview.LoadFromFile method.

I have wrote this code, but it doesn't works :
procedure FastReportPreview(AMyQueryTable: TMyQuery; AModeleField: string;
    AFastReportPreview: TFrxPreview);
var Modele : Tstream;
Begin
  AFastReportPreview.Clear; // <=== ACCESS VIOLATION

  Modele := TStream.Create;
  Try
    If Not AMyQueryTable.FieldByName(AModeleField).IsNull Then
    Begin

      Modele := AMyQueryTable.CreateBlobStream(AMyQueryTable.FieldByName(AModeleField), bmRead);
      AFastReportPreview.PreviewPages.LoadFromStream(Modele); // <=== ACCESS VIOLATION
    end;
  Finally
    freeandnil(Modele);
  End;
End;

Please considere I want to load an Fr3 file and not a Fp3 file.

If this is not possible, how can I do for displaying the fr3 file ?

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.