Results 1 to 6 of 6
  1. #1
    mercapto is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2012
    Location
    Spain
    Posts
    91

    To add new last page to report only if condition is met

    I would like to add a sort of coupon behind the common report, but only if condition is met.



    I don't want to mess the rest of the report and I neither want to add blank pages in case that condition is not met.

    How would you do this in the report??

    thanks in advance

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Put a sub report in the reg report footer but make it invisible. This is the coupon.
    in the reg report Footer onPrint event:

    subRpt.visible= myCondition

  3. #3
    mercapto is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2012
    Location
    Spain
    Posts
    91
    Thanks, ranman.

    Got some problems...

    If I force printing new page before the section, new page is printed even if not visible.
    If I don't do it, the coupon goes with the rest of the report (and, as I said, I want to keep it separate).

    And I don't understand the advantage of using a subreport instead of a textbox.

    What do you suggest?

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Sorry, I didnt know what the coupon consisted of. (i think of images)
    Yes use a text box and make IT invisible or visible.

  5. #5
    mercapto is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2012
    Location
    Spain
    Posts
    91
    And how do you avoid blank pages?

  6. #6
    mercapto is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2012
    Location
    Spain
    Posts
    91
    Got it.

    I placed a 0 height textbox in a the footer of the report (0 height as well). Then, if condition is met, I make the text box very big (6000 in my example) and it jumps to another page.

    Thanks for your help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 06-19-2014, 01:51 AM
  2. Report with page break appears with a blank page, why?
    By clebergyn in forum Programming
    Replies: 4
    Last Post: 02-24-2014, 12:32 PM
  3. Replies: 1
    Last Post: 03-05-2013, 06:38 PM
  4. Replies: 3
    Last Post: 08-07-2011, 09:22 PM
  5. Page break on report inserts empty page between
    By Galadrielle in forum Reports
    Replies: 0
    Last Post: 07-07-2010, 04:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums