Avatar of valencehealth
 asked on

Report Footer printing on page 2 when using columns in detail

I have a report that I use columns in the detail so that there are 2 columns on the page going up to down and then left to right.  The detail is also set to Keep together because it contains several lines.  I also have a report footer on the report.  The report is working fine for the most part except for one the detail goes into the second column but doesn't use the entire second column.  When this happens the report footer gets printed on the next page, however if the bottom detail in the first row appeared on top of the second row there would be plenty of room for everything to be one page.  This is what it looks like:

Page 1:
      Approval Report
App1       App6
App2       App7

Page 2:
Report Footer
Total of Approvals: $100


I would really like for the report footer to print directly under App7 (it is the same width as the details).  But if that can't be done then I would at least like the report to move App5 to the top of the second column so that there is room for the footer at the bottom of the page.  Thanks.

Microsoft Access

Avatar of undefined
Last Comment

8/22/2022 - Mon
Rey Obrero (Capricorn1)

have you tried to make adjustment to the detail, header/footer to only accomodate a certain number of rows to be printed.


How do you do that?

What I have tried is using subreports, but that gave me the same exact results.
Rey Obrero (Capricorn1)

try forcing a  page break using codes
place a textbox {txtRows }, you can hide this
set the following properties of the textbox
control source =1
running sum: over group

then place this in the reports module

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If txtRows Mod 5 = 0 Then   ' << change 5 to any number
        Detail.ForceNewPage = 2  
        Detail.ForceNewPage = 0  
    End If
End Sub

see if that will work for you

Your help has saved me hundreds of hours of internet surfing.
Rey Obrero (Capricorn1)

sorry, i  think that will not work..
you need to force the next record to the second column not on the next page
Rey Obrero (Capricorn1)

can you post your db here       http://www.ee-stuff.com/
i think i have an idea on how to do this

OK, I just uploaded it, I hope it worked.

Just so you know what you have to do.  Open up the form frmAppPrint.  Select a Client and it should bring up a bunch of approvals (if there aren't any or there only  afew choose a different client).  Select about 10 approvals to be printed by using the check boxes, they print out in different sizes but 10 should make it so that it uses the second column but still has room left.  Click the print button and you will see the report I am talking about.

You will see a lot of numbers on the report, those are probably names and addresses that I cut out to make this database for you to look at.  I did test it however and it should be working fine.

Let me know if this doesn't make sense.

Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

I don't think my first upload worked so I uploaded it again.  Here is the url for the file:

Rey Obrero (Capricorn1)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Yes, going accross then down does solve the problem of the footer on page 2, there is actually no need for the page break code because it will automatically break at the bottom of the page.  However I was hoping to get the report to go down then accross, that is how our clients are used to seeing this report look.  If you don't think its possible to it this way then going accross will be fine.

Also, counting rows is problematic becasue I have the can grow/can shrink properties set up on the detail section and some records can probably be twice as big as others.