Merging preview result
I'm trying to merge 2 fastreport previews result but it's not working as I expected..
Could someone help me to fix this one ?
Example)
var
aStream:TMemoryStream;
begin
aStream := TMemoryStream.create;
TBlobField(Qry.FieldbyName('report_blob')).SaveToStream(aStream);
aStream.position := 0;
frxReport1.PreviewPages.LoadFromStream(aStream);
aStream.clear;
TBlobField(Qry.FieldbyName('report_blob_2')).SaveToStream(aStream);
AStream.position := 0;
frxReport2.PreviewPages.LoadFromStream(aStream);
frxReport1.PreviewPages.AddFrom(frxReport2) //try merge previews.. and I gets "list index out of bounds(-1)" error message
Could someone help me to fix this one ?
Example)
var
aStream:TMemoryStream;
begin
aStream := TMemoryStream.create;
TBlobField(Qry.FieldbyName('report_blob')).SaveToStream(aStream);
aStream.position := 0;
frxReport1.PreviewPages.LoadFromStream(aStream);
aStream.clear;
TBlobField(Qry.FieldbyName('report_blob_2')).SaveToStream(aStream);
AStream.position := 0;
frxReport2.PreviewPages.LoadFromStream(aStream);
frxReport1.PreviewPages.AddFrom(frxReport2) //try merge previews.. and I gets "list index out of bounds(-1)" error message
Comments
I'm also having this issue.
when merging 2 reports : no problems
when merging more then 2 reports : "list index out of bounds(-1)" error