Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2010
    Posts
    20

    Unanswered: Turn off/on subreports

    I have a report in Access containing 4 sub reports in the detail section. One of the subreports is actually an OLE object that I show/hide (using code) based on a value returned in the report query - a flag off/on based on participation in a program. I have the particular object hidden on report load and becomes visible if the flag is on. That's all working fine. BUT this object is also causing a blank page to print after the records where the flag is 0 (no flag = no participation).

    I have gone through all the sub reports and main report page setups, margins, page width and length, resized all the detail sections, etc. - this is not the problem.

    If I delete the OLE object the report does exactly what it should with no blank pages which leads me to believe that the OLE object makes the detail section of the report just enough too long causing the blank page.

    Since not having the OLE object on the report is not an option I have another thought. Is there a way to begin with the OLE object not even on the report but actually add it if the flag is on? OR code in VBA to delete blank pages?

  2. #2
    Join Date
    Oct 2004
    Location
    Oxfordshire, UK
    Posts
    89
    If the object is an image, I might have an ugly but useful work around:
    1. Put the image in the page footer.
    2. Bind the image subform to a query that returns 1 record when true and no record when the condition is not met.

    One record per subform is a bit pricey but it works...

  3. #3
    Join Date
    Jan 2010
    Posts
    20
    Thanks NewFlavour, I'll try anything at this point. I'll let you know how it works!

Posting Permissions

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