[fpc-pascal] fpreport: can not use two ObjectLists as datasource in one report
Andreas Frieß
friess at gmx.at
Thu Mar 18 12:46:47 CET 2021
I have a sample attached to show the problem.
I want in the report (created a runtime) to use more than one report
datasource. I create a databand and connect this with a
TFPReportObjectListData object. Each TFPReportObjectListData object
works. But i want to have the data of the first, then the data of the
other object. But i am not able to combine this two Data in one Report.
*--------------------*
DataBand := TFPReportDataBand.Create(p);
DataBand.Name:= 'DBBand01';
DataBand.Layout.Height := 10;
DataBand.Data:= lReportOLData1; // First Data !!!!! This is shown
Memo := TFPReportMemo.Create(DataBand);
Memo.Layout.Left := 5;
Memo.Layout.Top := 0;
Memo.Layout.Width := 60;
Memo.Layout.Height := 5;
Memo.Font.Name := defaultFont;
Memo.Text := '[InfoA] - [ValueA]';
DataBand2 := TFPReportDataBand.Create(p);
DataBand2.Name:= 'DBBand02';
DataBand2.Layout.Height := 10;
DataBand2.Data:= lReportOLData2; // Second Data !!!!! This is not shown
Memo2 := TFPReportMemo.Create(DataBand2);
Memo2.Layout.Left := 5;
Memo2.Layout.Top := 0;
Memo2.Layout.Width := 60;
Memo2.Layout.Height := 5;
Memo2.Font.Name := defaultFont;
Memo2.Text := '[InfoB] - [ValueB]';
*--------------------------*
Any Hint for this problem to solve ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 10_SimpleReportObjectList.zip
Type: application/x-zip-compressed
Size: 21174 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20210318/9185a79b/attachment-0001.bin>
More information about the fpc-pascal
mailing list