Results 1 to 7 of 7
  1. #1
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Alternate Landscape and Portrait in a Report (Access 2002/SP2)

    Does anyone know if it is possible to:
    1) Change page orientation during a report? I have a section that I want to print out in landscape while the rest should print out in Portrait. If this is not possible.
    2) Can fields themselves be rotated? Or
    3) If I split the report into 2 separate reports, is there a method for carrying the page count from one report over to the next?

    If there is an alternate solution I've missed, please let me know.

    Cheers
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

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

    Re: Alternate Landscape and Portrait in a Report (Access 2002/SP2)

    1) No, that is not possible
    2) Only using exotic tricks
    3) If you can create PDF documents, a possibility is not to display page numbers in the two reports, but to create one PDF file merging the two reports, and do the page numbering there.

    Otherwise, try this:
    - Define a variable and a function in a standard module:

    Public lngNumPages As Long

    Public Function GetPageNum(pg As Long) As Long
    GetPageNum = pg + lngNumPages
    End Sub

    - Create an event procedure for the On Print event of the page footer section of the first report:

    Private Sub PageFooter_Print(Cancel As Integer, PrintCount As Integer)
    lngNumPages = Me.Page
    End Sub

    - Set the control source of the text box displaying the page number to =GetPageNum([Page])

  3. #3
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Alternate Landscape and Portrait in a Report (Access 2002/SP2)

    Door #3 it is <img src=/S/grin.gif border=0 alt=grin width=15 height=15>!
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Alternate Landscape and Portrait in a Report (Access 2002/SP2)

    There is another alternative, though probablyi uglier than Door #3. You could create the report as a Word document, put in section breaks where you want to switch from portrait to landscape and vice versa using Automation. That approach gives you lots of control over formatting, though it can be pretty tedious. If you are intrigued, there are several links to Automation articles in our Automation Tutorial.
    Wendell

  5. #5
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Alternate Landscape and Portrait in a Report (Access 2002/SP2)

    Thanks - I'm ducking that one for now!
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  6. #6
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Alternate Landscape and Portrait in a Report (Access 2002/SP2)

    For anyone following this thread:
    I came up with an alternate solution to the one Hans presented. In my senario, the second document (the one I wanted in landscape) holds graphics. 1 graphic per page. I am treating the second document as an appendice to the first, so I wanted the page numbering in the first document to include the number of pages in the appendix.
    I solved this by
    1) writing a query to count the number of graphics associated with the document.
    2) making that query part of the record source for the report
    3) using the following as the control source for the page numbering:
    <font color=blue>=IIf(IsError([CountofGraphicID]),"Page " & [Page] & " of " & [Pages],"Page " & [Page] & " of " & ([Pages]+[CountofGraphicID]))</font color=blue>
    The IsError checking was necessary for reports that didn't have any graphics because the lack of info in the CountofGraphicID field generated an error.

    I hope this is useful to someone else.
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  7. #7
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Alternate Landscape and Portrait in a Report-Oops

    <P ID="edit" class=small>(Edited by WebGenii on 02-Apr-04 12:42. )</P>Now for a quick Oops followup to my previous post.
    I've just discovered that documents without graphics associated with them are not displaying. However, page numbering works beautifully in both scenarios <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>. I had my beady little eyes so focused on the page numbers - I failed to notice the lack of data in the rest of the report. <img src=/S/doh.gif border=0 alt=doh width=15 height=15> .
    So, it seems I'll have to go back to the query that forms the record source... argh!
    <img src=/w3timages/redline.gif width=33% height=2>
    PS a change of the join properties in the query solved the problem
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

Posting Permissions

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