Lazarus

Programming => Packages and Libraries => LazReport => Topic started by: mrkwlee on January 10, 2019, 07:50:52 am

Title: one large record in 2 pages
Post by: mrkwlee on January 10, 2019, 07:50:52 am
I get a database with large data record which have to fit in two A4 papers. When a few records are printed, they are in the order of p.1 of record 1, then p.1 of record 2, then p.1 of record 3....,then p.2 of record 1, then p.2 of record 2, then p.2 of record 3.... Do anyone know how to print p.1 and then p.2 of record 1, then p.1 and p.2 of record 2..
Title: Re: one large record in 2 pages
Post by: GetMem on January 10, 2019, 08:08:54 am
I assume you get record 1,2,3 through a query. At database level, you can assign to each item a unique_id or sort_id if you like:
sortid    value
r1.p1 --> 1
r2.p1 --> 2
r3.p1 --> 3
r1.p2 --> 4
r2.p2 --> 5
etc...
Before you load the report, sort the query by sort_id.
Title: Re: one large record in 2 pages
Post by: mrkwlee on January 10, 2019, 09:22:09 am
Thank you  I will try.