Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jan 2012
    Posts
    155
    Thanks
    118
    Thanked 0 Times in 0 Posts

    not print blank pages when subreport

    Friends, I have a report with subreports eight, but sometimes, some sub has no data. Are getting blank pages
    prints how do I fix?
    Thank you.

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    2 Star Lounger HiTechCoach's Avatar
    Join Date
    Sep 2011
    Location
    Oklahoma City, OK
    Posts
    162
    Thanks
    0
    Thanked 24 Times in 24 Posts
    Are the sub report control's Can Shrink property set to Yes? You will also need to be sure that each section that has a sub report is also set to Can Shrink = Yes.
    Boyd Trimmell aka HiTechCoach (Access Information here)
    Microsoft MVP - Access Expert
    "If technology doesn't work for people, then it doesn't work."

  4. The Following User Says Thank You to HiTechCoach For This Useful Post:

    fabiobarreto10 (2012-04-28)

  5. #3
    2 Star Lounger
    Join Date
    Jan 2012
    Posts
    155
    Thanks
    118
    Thanked 0 Times in 0 Posts
    Thanks for responding and helping. Resolved, as you told me, but to place it can shrink and can expand,
    for all sections of all subreports also placed time zero for all subreports.
    In the event when loading the subreport I repeat this code for each sub:

    Then if Me.Filho0.Report.HasData
    Me.Filho0.Visible = True
    else
    Me.Filho0.Visible = False
    end If

    In the event if you are not given for each sub I put:
    cancel = True

    As I open the report it is all empty, but when I print, it prints perfectly, if the sub is no data, shows
    and also the sub fully expand.

    Only when I open'm not seeing anything.

    Thank you.

  6. #4
    2 Star Lounger HiTechCoach's Avatar
    Join Date
    Sep 2011
    Location
    Oklahoma City, OK
    Posts
    162
    Thanks
    0
    Thanked 24 Times in 24 Posts
    Not sure why you need all that VBA code. I have never had to use any VBA code to do what you want.

    ... also placed time zero for all subreports ....
    I do not understand what this means.


    n the event if you are not given for each sub I put:
    cancel = True
    Which event? I have never had to do that before in a sub report

    Only when I open'm not seeing anything.
    That sounds like an issue caused by your VBA code.

    Would it be possible to post a sample database with the report?
    Boyd Trimmell aka HiTechCoach (Access Information here)
    Microsoft MVP - Access Expert
    "If technology doesn't work for people, then it doesn't work."

  7. The Following User Says Thank You to HiTechCoach For This Useful Post:

    fabiobarreto10 (2012-04-28)

  8. #5
    2 Star Lounger
    Join Date
    Jan 2012
    Posts
    155
    Thanks
    118
    Thanked 0 Times in 0 Posts
    Ok I'm sending the bd. The report name is XXXAndirleiGeral3XXX, is the last report.
    I put in all sections of all the subreports I put yes in order to expand and also to reduce power.
    I pulled out all the VBA, but now is not hiding the subs empty, and also getting to blank in the subform.
    See, my biggest problem is the view when I open the report.

    Thank you.
    Attached Files Attached Files

  9. #6
    2 Star Lounger HiTechCoach's Avatar
    Join Date
    Sep 2011
    Location
    Oklahoma City, OK
    Posts
    162
    Thanks
    0
    Thanked 24 Times in 24 Posts
    It was easy to fix. I turn off the page header and footer on each sub report.

    NOTE: If you view the report in Report view this sub reports will probably always show. They will auto hide properly in Print Preview.

    I would also set the default vie to Print Preview. I would also set the Allow report View to No since the report will display the way you want Report View.

    I generally avoid Report view. If I do use it I create two different report,. One for using with Report View. Another used for Printing.


    I am tryng to attach the database I fixed. I am not able to upload the file. I will try again later
    Boyd Trimmell aka HiTechCoach (Access Information here)
    Microsoft MVP - Access Expert
    "If technology doesn't work for people, then it doesn't work."

  10. The Following User Says Thank You to HiTechCoach For This Useful Post:

    fabiobarreto10 (2012-04-28)

  11. #7
    2 Star Lounger
    Join Date
    Jan 2012
    Posts
    155
    Thanks
    118
    Thanked 0 Times in 0 Posts
    HiTechCoach, thank you for your help, Sorry for being slow to respond, I was without internet.

    I was able to partially resolve. I put a button on the form to open the report.

    Thus, it opens directly in Print Preview, subreports showing correctly and also printing correctly.

    Still, if possible, send me what you got, if you can not the forum, send the dropbox.

    Again, thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •