Subject |
Re: Report group headers |
From |
Mervyn Bick <invalid@invalid.invalid> |
Date |
Sun, 31 Dec 2023 23:16:44 +0200 |
Newsgroups |
dbase.getting-started |
On 2023/12/31 20:54, Charlie wrote:
> Happy new year to everyone.
>
> Ken you weren't fooling when you said this is complicated.
>
> I studied the book code but used Mervyn's code as I don't have the example from the book and Mervyn's was easy to copy and paste. I didn't understand the module that oChild is supposed to equal either but probably because I haven't read the whole book. I tend to learn from doing not reading. I think I understand what is going on. But I am getting an error for a missing rowset which I don't understand. I get this error after five pages show printed. But only 2 pages actually print, and the second page doesn't print the header (category) again at the top of the page.
>
> Any help would be appreciated.
For the example in Ken's book he uses a parent and a child table. The
parent table determines the group and the child table contains the data
for the group. The code counts the records in the child table for the
next group so that the space required can be calculated. oChild is a
"shortcut" reference to the child table in a data module.
In your report you JOIN the two tables instead of using parent and child
tables. This creates a single rowset which makes the handling much
easier.
I can't run your report without the two tables (collection and category)
so it would help if you post them here. If you don't want to make the
tables generally available perhaps you would email them to me at
bickmeo at gmail dot com
I did, however, notice one potential problem. The rowset must be
ordered primarily by the field used in the group1 groupBy property.
This field is 'category' but the rowset is ordered by ordr,sku You
should change that to ... order by category,ordr,sku
Mervyn
|
|