Save a Report in a Dataset
Hi,
is it possible to save a Report in a Tabel? (Memo or Ole-Object)
Who has a Demo-Source?
Greetings
Ala
is it possible to save a Report in a Tabel? (Memo or Ole-Object)
Who has a Demo-Source?
Greetings
Ala
Comments
ms:=TMemoryStream.Create;
try
Report.SaveToStream(ms);
ms.Position:=0;
Conn.Connected:=true;
Qry.SQL.Text:=Format('SELECT FROM WHERE', []);
Qry.Open;
try
BlobField:=TBlobField(Qry.Fields[xxx]);
if Qry.RecordCount=0 then Qry.Append else Qry.Edit;
BlobField.LoadFromStream(ms);
Qry.Post;
finally
Qry.Close;
Conn.Connected:=false;
end;
finally
if ms<>nil then ms.Free;
if Qry.Active then Qry.Close;
if Conn.Connected then Conn.Connected:=false;
end;