Results 1 to 5 of 5
  1. #1
    RyanP is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    60

    Variable Page Widths in Reports


    Is there any way to have the Report width (page layout) flip into landscape for only select pages of a report (those containing landscape oriented imagery / maps which are loaded into the report as image controls)

    e.g. X pages of Portrait orientation pages, followed by X pages of Landscape or flipping between Portrait & Landscape throughout...


    Method 1 (Ideal): able to have the report go back and forth between portrait and landscape
    Method 2 (OK): Push all the landscape pages to the end (If so, how can you configure bookmarks within the report (that would be transferable to the subsequent PDF export)

    With method 2; Creating 2 reports and combining them would work... (with bookmarks / all automated?)

    We currently do this as a post processing task in Adobe Acrobat, but I would like to automate it in Access do we can ditch Acrobat altogether due to the subscription fees.
    Not entirely adverse to Access / Acrobat automation as well... have not personally been able to find much (free) information in this regard online...

    (related question: How to set the Image Control dimensions independently for each image in a report. Would do this in tandem with the variable page widths)

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    There are a number of options for changing orientation - which is right for you depends - google 'access vba change report orientation' for a number of solutions. Not sure where you would apply the code, you will need to experiment - suggest maybe the on format or on page events

    related question: How to set the Image Control dimensions independently for each image in a report.
    use the move functionality to set left, right, width and height values, or use the left, right, width and height properties independently e.g.

    myimagecontrol.move 0,0,100,200

    or

    myimagecontrol.width=400

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I have never tried to accomplish this but I would guess it is not possible. If I were trying to get it done, I would brush up on the Page property and see if I could get the page numbers to Debug.print at specific key values. I would place VBA in the On Format event of a specific section of my report. Depending on what approach I took, I may be interested in the value of the On Page property, also.
    https://msdn.microsoft.com/EN-US/lib.../ff195525.aspx
    https://msdn.microsoft.com/EN-US/lib.../ff835059.aspx

    From there, you would have to get the Printer and go after its properties. As far as I can tell, the Printers Collection is just under the Application layer. So I do not think you will have much success adjusting the printer while the report is being rendered. I have had enough trouble just trying to select a specific printer for a specific Reoport Object, let alone adjusting the printer properties on the fly. Maybe something like
    Code:
    Me.Printer.Orientation = acPRORLandscape
    https://msdn.microsoft.com/EN-US/lib.../ff193183.aspx
    https://msdn.microsoft.com/EN-US/lib.../ff198274.aspx

    The only way is probably to print or export to PDF and then Automate Acrobat via Access.
    I would probably render two reports, one in landscape and one in portrait. I would use info from the Report's Page Property or search for text in the PDF file after it was rendered. With the page numbers in hand, I would create a new PDF file using Acrobat Automation.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    I think still must have Adobe Acrobat (not Reader or Distiller) installed for the automation to work. Or maybe with other software https://groups.google.com/forum/#!to...ss/b42SlQI5xKE
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by June7 View Post
    I think still must have Adobe Acrobat (not Reader or Distiller) installed for the automation to work.
    Correct, the machine that executes the code to Automate Acrobat will need to have Acrobat installed. I suspect there is a way to do it with Acrobat installed on only one machine.

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

Similar Threads

  1. Listbox - Column Widths issue
    By Ganesh7299 in forum Access
    Replies: 12
    Last Post: 01-09-2014, 09:38 AM
  2. Replies: 4
    Last Post: 08-05-2013, 05:30 PM
  3. Variable across multiple forms/reports
    By Poyan in forum Access
    Replies: 1
    Last Post: 05-31-2011, 11:03 AM
  4. Page number in reports
    By SFC in forum Access
    Replies: 2
    Last Post: 03-08-2011, 11:09 AM
  5. Fixed column widths in SubForm
    By nyteowl in forum Access
    Replies: 4
    Last Post: 10-15-2010, 02:00 PM

Tags for this Thread

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