LoadFromStream() : Invalide Filename

edited November 2004 in FastReport 3.0
Hello,

I'm trying to use the LoadFromStream Method. I can't get it works !

Here is the sample of my code :
procedure TForm1.Button1Click(Sender: TObject);
var template : TStream;
begin
template:= ZReadOnlyQuery1.CreateBlobStream(ZReadOnlyQuery1.FieldByName('Report'), bmRead);
try
frxreport1.LoadFromStream(template);
frxreport1.DesignReport;
finally
template.free;
end;
end;

I'm getting an exception with : frxreport1.LoadFromStream(template);
It tells me that the file format is no good !!!!

Am i doing something wrong ?

Thank you

Comments

  • edited 10:07AM
    Try this:
    ...
    template:= ZReadOnlyQuery1.CreateBlobStream(ZReadOnlyQuery1.FieldByName('Report'), bmRead);
    Template.Postion := 0;
    try
    frxreport1.LoadFromStream(template);
    ...
  • edited 10:07AM
    Thank you for the answer, but i found my problem : the blob field size was too small. The fr3 file was truncated....

    Thank you anyways ;)

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.