Results 1 to 3 of 3
  1. #1
    tcarnahan is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2013
    Posts
    9

    Scaling a report preview so that all fields show to the right on one page

    I previously posted about a report I created that is based on a SQL Server pivot (pass through) query. As such, based on what is selected before the report retrieves data from the query, my report could have the standard 3 fields on the left and fields 4 through 12 based on the number of fields the pivot query returns.

    I already have the code worked out to display or not display controls containing fields 4 through 12, based on whether or not the pivot query returns them. It works very nicely to give me a report with varying number of fields (I hide the controls I don't use on the left of the report).My report is designed to be used in preview and not necessarily printed (probably not).

    What I am experiencing looks a lot like what happens if you have a 11 inch paper size in landscape orientation selected but your report is 14 inches wide. The right so many inches of the report "spills over" on the preview to a following page.

    I vary the report.width based on the number of fields returned by the query and spacing between fields. In the extreme case where I have 12 fields returned, I get fields 1 through 9 on the first page and fields 10 thru 12 on the following page (minus fields 1 thru 3) when I preview the report.

    I use the printer property with .default set to False and I set .PaperSize = acPRPSUser and adjust the width there, but when previewed, fields 10, 11, and 12 still spill over to the following page. When I use .zoom, I just get a smaller version of fields 1 thru 9 on one sheet and 10 thru 12 on the next. I tried using a paper size of 11 x 17 ... it still spills over.

    I would like to preview the report and have the visible "paper" outline on the screen vary with the number of fields returned by the pivot query and use zoom to scale the report so that it shows on the screen as fields 1 thru 12 on one page.

    I realize this is probably not the right vehicle to use for this presentation, but I already have 95% of it done .... I just need to preview on page on one screen.

    Thanks ahead of time for any suggestions you have!



    Here is an example of what I see in the preview with 12 fields. In this example, Fields 10, 11, and 12 show no data for these records, but they do return values for other records:

    Click image for larger version. 

Name:	Screen 1.jpg 
Views:	10 
Size:	92.0 KB 
ID:	14582 Click image for larger version. 

Name:	Screen2.jpg 
Views:	10 
Size:	28.1 KB 
ID:	14583
    Last edited by tcarnahan; 11-30-2013 at 02:20 PM. Reason: Added some screen print examples

  2. #2
    tcarnahan is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2013
    Posts
    9
    I forgot to mention in my screen print that the one on the left is what I see on page 1 and the next page contains the "spill over". I picked a bad example. If I had shown you page 11 and 12, on the second page, you would have seen the header labels and the data in fields 10,11, & 12.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    That is code to set the report page layout properties? What procedure is the code in? Post the code.

    If there aren't any features that demand a report object (such as grouping) might be easier to program a form.

    Do you want to provide db for analysis? Follow instructions at bottom of my post.
    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.

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

Similar Threads

  1. Replies: 21
    Last Post: 08-06-2013, 01:02 PM
  2. Report Width - Scaling dynamically
    By RonL in forum Reports
    Replies: 5
    Last Post: 06-30-2013, 07:44 PM
  3. Replies: 2
    Last Post: 02-08-2012, 01:03 PM
  4. scaling Word OLE object in Access Report
    By Jeff Perkins in forum Reports
    Replies: 1
    Last Post: 09-11-2011, 03:18 PM
  5. show 4 records in each report page
    By kareem_h in forum Reports
    Replies: 5
    Last Post: 11-10-2010, 10:11 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