Home End User

Invalid Template Format

edited November 2002 in End User
I'm having an Invalid Template Format Error, I'm using Asta 2.6 Delphi
5, RB 6.03 and SQL Server 2000, I modified the tblItem (
TAstaClientDataset) to do not request template information, using
TAstaClientDataset.SQLOptions.soFetchMemos/soFetchBlobs and the code
below, it works fine for most of the reports except a few of them, with

those reports send the Invalid Template Format Error.

procedure TdmManager.ReportTemplateLoadStartEvent(Sender: TObject; S:
TStream);
var sBlob: String;
begin
sBlob:= tblItem.FetchBlobString('rb_item', 'template', 'Where
Item_Name=' + EntreComillas(tblItem.FieldByName('Item_Name').AsString
));
StringToStream(sBlob, TMemoryStream(S));
TBlobField(tblItem.FieldByName('Template')).LoadFromStream(S);
end;

BOW if I turn on the properties and remove LaodStartEvent code, all
reports work fine, extremely slow of course

Thanks for any help or suggestions to come

Gustavo Lennin
This discussion has been closed.