[Lazarus] Lazreport master-detail on one line

Koenraad Lelong lazarus2 at de-brouwerij.be
Mon May 26 13:26:34 CEST 2014


Hi,

I want to make a report of database data. The data has a master-detail 
relationship. For every master-record there are a fixed number of 
detail-records.
A detail record = ItemCode, ItemValue

So I make a lazreport. I put a masterheader band on the report and I put 
some text on it. Then I put a masterdata band on the report and I put 
some rectangle objects on that band and connect those the master-table. 
When I show the report, everything is like I want it.
Next step is to add detail-fields. I though that using a cross-data band 
was the needed tool. On the crossing of the masterheader-band I put a 
rectangle-object and couple this to the detail-field ItemCode.
On the crossing of the masterdata-band I put a rectangle-object coupled 
to the detail-field ItemValue.

When I now show the report, my master-information is OK, for all 
master-records, but the detail-information is that of the first 
detail-record, for all master-records. Also the information of the 
detail in the master-header is OK.
I have two grids showing the master-detail information so I know my 
queries are OK.

What am I doing wrong ?
Enclosed a screenshot. Green ovals contain correct data, the red oval 
contains bad data.

Koenraad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lazarus2.jpg
Type: image/jpeg
Size: 49562 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140526/698fd2ab/attachment-0003.jpg>


More information about the Lazarus mailing list