Hidden sections skew page count in output

Hi,

I have a database file Source.odb with a table Main. Main contains a variable Quantity Files.

I have six sections, each defined to be hidden if Quantity Files is NEQ 1, NEQ 2, … NEQ 6. Before I select a record in the mail merge, all sections are shown. I’m not sure if this is correct, but my hiding condition for the sections is [Source.Main.Quantity Files] NEQ x with x = 1-6. Once I print to .pdf, only one section is (correctly) shown.

Now, before printing and selecting a record, the six sections take so much space that it makes my one-page letter a two-page letter. When printing to .pdf, my page count says Page 1 of 2, even though the output document (containing only one out of six sections) only has one page.

If I select a record in Data Sources and click Data to Field to populate the variables before printing, the “incorrect” sections also remain visible. They only get removed once I print (to a file). If I reduce the sections to three sections, which then can fit on one page, the page count in the output file is correct.

It seems like the page count doesn’t count actual output pages, but the number of pages that would result if all (hidden) sections are included. How do I fix the page count?

Quantity Files with a space?

Yes, is it not posible to use spaces?