Subject BlobStream from ReportBuilder to TIB_Query
Author das_ist_aber_einfach
I tried to put the Reportbuilder archive-stream directly into a TIB_Query.
But i make some mistakes, i think.

I used the code like that:

procedure TMainF.bPrintToArchivClick(Sender: TObject);
var
lArchive, tmpMStream : TMemoryStream;
lArchiveDevice : TppArchiveDevice;
tmpStream: TStream;
begin
//Load the Report-Templates from DB
ppReport1.Template.DatabaseSettings.Name :=
quTemplates.FieldByName('NAME').AsString;
ppReport1.Template.LoadFromDatabase;

lArchive := TMemoryStream.Create;
lArchiveDevice := TppArchiveDevice.Create(nil);

try
lArchiveDevice.OutputStream := lArchive;
lArchiveDevice.Publisher := ppReport1.Publisher;
ppReport1.PrintToDevices;
finally
lArchiveDevice.Free;
end;

quArchiv.Append;
try

quArchiv.FieldByName('NAME').AsString :=
quTemplates.FieldByName('NAME').AsString;
tmpStream := quArchiv.CreateBlobStream(
quArchiv.FieldByName('NAME'), bsmWrite);
lArchive.SaveToStream(tmpStream);
//tmpStream.CopyFrom( lArchive, 0 );

finally
tmpStream.Free;
end;
quArchiv.Post;

ppDBArchiveReader1.Reset;
end;


I got the error in IB_Components:
at: "raise EIB_Error.CreateWithSender( Row.Statement,
E_Unassigned_Blob_Node );"
and the message (in german):
"Im Projekt UVV.exe ist eine Exception der Klasse EIB_Error
aufgetreten. Meldung: 'Nicht zugewiesener Blob-Knoten'. Prozess wurde
angehalten. Mit Einzelne Anweisung oder Start fortsetzen."


Thanks, Olaf

IBO 4.8.7, D7, RB 10, WinXP