Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Jun 2004
    Location
    Lambertville, New Jersey, USA
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditional Page 2 in report (2002)

    I have 2 seperate reports that each print a different page of a report. Some detail records only require page/rpt 1 to print, other records require both pages/rpts to print. The data printed on the 2 rpts is different but comes from the same query.

    I need to combine the 2 reports into 1 report so I can create pdf files for each detail record, some with 1 page, some with 2 pages.
    Currently, I am only creating hard copies so I can control which report is printed through code. However, since I will be creating pdf files, I need to create only one file per record - either 1 page or 2 pages each.

    Any ideas will be greatly appreciated.

    Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conditional Page 2 in report (2002)

    There are several possibilities. For example, you could put use code in the On Format event of the Detail section to toggle the Visible property of some controls depending on a condition.

  3. #3
    Star Lounger
    Join Date
    Jun 2004
    Location
    Lambertville, New Jersey, USA
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Page 2 in report (2002)

    Hans;
    Thanks for the suggestion.

    So if I set the controls that would make up the second page to be invisible, would I get a blank second page or no second page at all?

    Lance

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conditional Page 2 in report (2002)

    Yes, under the following conditions:
    - The Can Shrink property of the detail section is set to Yes.
    - The Can Shrink of all controls you want to hide is set to Yes.
    - There is no superfluous vertical space between the controls you want to hide.

    Another possibility would be to place the two pages as subreports on a main report, and hide the second subreport as needed. This time you only need to set the Can Shrink properties of the detail section and of the second subreport to Yes.

Posting Permissions

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