[Lazarus] LazReport, how to mix data from multiple datasets?
Luca Olivetti
luca at wetron.es
Wed Jan 11 10:20:19 CET 2023
El 10/1/23 a les 16:39, Luca Olivetti via lazarus ha escrit:
For the record:
in the report designer the band has a "Dataset" property and you can
assign to it the name of a TRfDbDataset on the form.
I tried that previously and it didn't seem to work.
After some painful debugging (which involved a complete rebuild of the
lazarus ide, don't ask me why, I'd like to know), I found out that the
property value, in spite of being there in the lrf file, wasn't being
read, but in the next debug session it was. Again, don't ask me why, but
now everything seems to be ok.
Bye
> Hello,
>
> I see that I cannot use more than one dataset in a report (actually I
> can, the problem is that the second dataset show always the same line,
> repeated for how many rows there are in the first one i.e.:
>
> ds1 row1
> ds1 row2
> ds1 row3
>
> ds2 row1
> ds2 row1
> ds2 row1
> )
>
>
> Previously I used two reports and combined them into a third one, i.e.:
>
> with CombinedReport do
> begin
> reports.clear;
> reports.add(FirstReport);
> reports.add(SecondReport);
> ....
> end;
>
>
> The problem is that the second report starts on a new page, while I need
> it to stay on the same page:
>
>
> *** Report header (or page header on subsequent pages)
> --- first dataset header
> ... first dataset data
> --- second dataset header
> ... second dataset data
> **** page footer
>
>
> The first dataset is supposed to occupy about half the page.
>
>
> Is there a way to do that? How?
>
> Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
More information about the lazarus
mailing list