Help with Xojo Reports


I was wondering if I could get some help with Xojo Reports. I have created a Report from an in-memory database, and it works OK. But I do have one thing which I cannot seem to work out. The image is of the first page of the report:

pdf of first page

You will see that at the top of the report there is a line: “Section: HARD FEATHERED FOWL (OEG GAME)”.

Then a little way down the page is line: “85 Araucana Cock”. This is at the start of the next section, LIGHT BREED.

The light breed section is quite long, so it continues over the page and the top line of that new page correctly says “Section: LIGHT BREED”

But what I would like to do is start a new page at the Araucana Cock line, which is actually the start of the new Section.

Is this possible to do from the Report class, or do I have to do it in code. If the latter, could I get a clue how this is possible?

I had thought that I could get a count of the number of sections in the database file, and then print the first section, then the second, etc, each one starting a new report printing procedure. But if I did that, would the user have to start the printing process for each section, or would it be possible to do them all with one command.

Many thanks

Oh, I should add that the SECTION is in the Header of the page, and the table in the Body.

And I notice when I viewed the post, it changed the second word of the Auracana bird to “Swear word status”. That is hilarious.

Any reason you are putting the section in the header of the page instead of the group header? Group header seems more logical here.

In the group footer section there is a property called “StartNewPageAtEndOfGroup” which is defaulted to No. Change it to yes and set your group by field and you should be good to go.

Thanks Bob, I will try that. I guess the only reason that I was putting the section in the header was because I wanted it to appear before the table heading. But in fact it doesn’t matter. What matters is that each section starts a new page.

Thanks for your help.