Produce Report Table that fills the entire page

Ebs

New member
Local time
Today, 08:20
Joined
Jan 13, 2020
Messages
3
Hello all,

I'm working on a report that models a DA2062 hand receipt. The short explanation of that is it's a table that should display boxes down the entire page. The first page takes 17 records to fill and subsequent pages are 19. However, if I have a number of entries (say 25) my current report will stop and leave the rest of the page blank. How do I ensure that the report produces blank records to fill the page regardless of the actual number of records?

I've some experience with VBA on Excel, but I'm a novice Access VBA user. Any help would be appreciated. Please let me know if I need to provide more information.

Thank you!
 
Hi. Welcome to AWF! I think there are demos available to show how to do that, but I'm on my phone right now and can't give you any links. I'll see if I can find them later.
 
There are various methods. Some use a table that is used only for the report wherein the table has a preset number of records (using a counter field) according to your requirement and the data is written to it using an Update query. The report query gets the data that was updated plus the counter field, so always n# records. You hide the number field in the report.
 
The report query gets the data that was updated plus the counter field, so always n# records. You hide the number field in the report.

That seems like it could work. What method could I use to ensure it's 17 or 17+19 or 17+19x? IF statement? Thank you.
 
Not 100% sure because this isn't entirely clear
The first page takes 17 records to fill and subsequent pages are 19. However, if I have a number of entries (say 25) my current report will stop and leave the rest of the page blank.
If you had said you wanted 17 records per page regardless, then I'd say a page break and a counting field with a running sum. In code, you unhide the page break when the counter gets to 17. But if there's 41 records, do 17 go on page one, 19 on page two, 5 on page 3 plus 12 blanks on page 3? That's not something I've ever done. I see the problem being the variance between page 1 and 2. If they were the same, likely you could calculate the blanks as in
(e.g. 41 records, 17 per page)

#OfBlanks = 17 - ( 41 Mod 17 )
#OfBlanks = 17 - 7 = 10
which means 17 on page 1, 17 on page 2, 7 on page 3 + 10 blanks.
In that case, I think this becomes primarily a code solution.

The 17 on one page and 19 on another is a bit beyond my experience but is no doubt doable. It will likely entail determining which page you're on when unhiding the page break in the report Detail Format event. Sorry, but I haven't ever done page breaks and record filler code together.
 
If the 17 vs 19 is going to make it that much more difficult, I can make due with 17 on each page. Thank you for the help I'll see if I can implement this.
 

Users who are viewing this thread

Back
Top Bottom