Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6832
  • Last Modified:

Remove Blank last page in Access report with group page break

I have searched around and did not find a straight forward and clear solution for removing a blank last page in an  Access report with group section page break (not the toolbox control). Can someone please help?

Thanks in advance?
1
Roberth509
Asked:
Roberth509
  • 7
  • 4
  • 2
  • +2
1 Solution
 
burrcmCommented:
You will get blank pages if -

The page is too wide, or empty/all report controls (fields) are not set to can shrink/grow = yes.

Chris B
0
 
hnasrCommented:
Are you using force new page after section?

Attach a sample database, reproducing the issue.
0
 
Roberth509Author Commented:
hnasr:,

Yes...I am using force new page after group footer and there is no problem with page width or margins...
There are many pages on the report and the only empty page is the last one.
I´ve no doudt the solution is to make use of code - the reasi=on I am asking for help...
Thanks
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Jeffrey CoachmanMIS LiasonCommented:
"Remove Blank last page in Access report with group page break"
*Totally* blank? ...or do you still have the Date and the number of pages on the bottom of this "Blank Page"?

In any event, this will happen if you have the "Force New Page" property of the Group footer set to: After Section
And you have just a little bit of the Report Footer visible in Design view.

So in design View, reduce the height of the Report Footer Section to Zero (0), and the issue should go away.

Sample attached
Database110.mdb
0
 
Roberth509Author Commented:
HI,

I have been experimenting and found out different behaviours between Access 2003 and 2010.

Everything works fine with 2003. There are no blank/empty pages appearing there.

My concern is really in Access 2010 - I need this to work for this version.

The height of my report footer has always been zero...but I do have controls within both page header and footer.sections (so last page is actually never empty).. But still had no success even after removing page header and footer.sections

Your kind sample also did not work in Access 2010
I did zero the length of page header and footer and the same occured: there it was: the last and empty page.

Thanks

0
 
Jeffrey CoachmanMIS LiasonCommented:
Then try this:

I added code, controls, ...etc, ... to match the number of records in the report with the number of records in the recordsource.
If they match, then turn off the force new page setting.

JeffCoachman
Access-EEQ26866681HideBlankPages.mdb
0
 
hnasrCommented:
Does it work with access 2007?
If not, attach the database.

Try boag2000's comment http:#35071847 first.
0
 
Roberth509Author Commented:
boag2000,
I´m sorry. but your sample mdb did not work in Access 2010. The code seems fine, but it does not trigger. I even changed the default Force new page in the Properties window to NONE, and that´s how the report was generated - even having your two conditions set to 2 - kind of like igmoring the code
0
 
Roberth509Author Commented:
hnasr,

I´m trying to make this work in Access 2010.
Didn't understand your suggestion to attach database..

Thanks
0
 
Jeffrey CoachmanMIS LiasonCommented:
Make sure you are opening the Report Explicitly in "Print Preview".
(either by setting it in the Report Open arguments, or setting Print Preview as the default view in the Report's properties.)
Report View is the default for Acc07 and newer, but most code won't trigger in Report View.
0
 
Roberth509Author Commented:
Yes...I confirm so...opening in Print Preview...now what? Seems we´re so close...
0
 
Jeffrey CoachmanMIS LiasonCommented:
Not sure,

I just downloaded my own sample and tried it in Access 2010, it worked fine...
(No blank page was generated...)

Are you saying that my sample (as downloaded) does not work?

...Or are you replicating my system in your database, and it is not working?
0
 
Roberth509Author Commented:
Very neet solution...I am very grateful...
0
 
Roberth509Author Commented:
boag2000,

Bingo!!!
When you mentioned it worked on your Access 2010 I tried it once more on mine and discovered that the security setting on my Access 2010 (installed just a few days ago) was set  so no code was being executed.
Sorry to have taken a bit more of your time.
Thanks a lot...
0
 
rjordanbotsCommented:
I replicated the code in my actual database, my report also had a grouping on user. The code your provided is working. I was just hoping to resolve one more item.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 7
  • 4
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now