Results 1 to 4 of 4
  1. #1
    TOPSie is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2021
    Posts
    108

    Printing complex reports

    I have posted several questions both here and elsewhere regarding issues I have had printing complex reports. I have finally got a working solution so I want to share it here to help others.
    The scenario is that this report has a very complex structure, including 3 sub reports. And all has to fit on a sheet of A5 paper. Depending on the contents, particularly the sub reports then sometimes the report stretches to 2 pages, which must be printed double sided.
    To further complicate matters my development system is off-site and cannot "see" the large "enterprise" printers on site, of which there are two different models. The development system has its own "desktop" printer.

    MS Access cannot cope with having multiple printers associated with a report. You can get away with this if the report's printing requirements are simple and "standard". But if they are complex you hit various issues.
    If I update the report design on the development machine, when it is deployed to production the report prints incorrectly (wrong paper size, wrong tray and not double sided - in various combinations)



    The answer I have found is to do any necessary development. Load the developed .accdb file to each production PC (fortunately only 2 of them) and before running the application enter design mode for the report and configure the report (Page Setup) to match the printer attached to the PC (printer are on the network - but each PC has its own Default printer). Then save the .accdb where it will be picked each time the app is loaded on the PC.

    As the application is getting frequent updates - rarely for this particular report - it makes deployment of updates more complicated - but at least I have a happy customer as far as printing is concerned.

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Really should not be issuing .accdb to production environment.

    I am sure you could have two reports and you use whatever fits that particular PC.

    I had an issue once where a user wanted a different layout as his eyesight was poor. So I tested for his username and amended to suit.

    Code:
    '
    ' Show different layout if using wide screen due to eysesight problems
    '
        If Me.txtFull_Name = "Gareth Cross" Then
            intwidth = 50
            intTop = 6000
            Me.Payments_Subform.Visible = False
            Me.Payments_Subform2.Visible = True
        Else
            intwidth = 30
            intTop = 8500
            Me.Payments_Subform.Visible = True
            Me.Payments_Subform2.Visible = False
        End If
        
    ' Adjust the buttons now. Measument is in twips, 6000 = 10cm & 8500 = 15 cms approx
    
    
            Me.cmdCopy.Top = intTop
            Me.cmdSave.Top = intTop
            Me.cmdCaseFlow.Top = intTop
            Me.cmdRequery.Top = intTop
            Me.cmdClose.Top = intTop
    Last edited by Welshgasman; 03-22-2024 at 01:53 PM.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Really should not be issuing .accdb to production environment
    Except that if you're stuck with this method, you can't edit objects in mde or accde files?
    I would have thought there were vba options to control printer settings/options but have to admit I've never had to do so.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Yes, and that is the main reason I thought, for their existence?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Query logic for two different complex reports
    By xboxown in forum Reports
    Replies: 3
    Last Post: 12-14-2017, 06:54 PM
  2. Printing Reports from a form
    By ManuelLavesa in forum Programming
    Replies: 5
    Last Post: 09-12-2015, 07:31 PM
  3. Hyperlinks in Reports printing to PDF
    By IslandHydro in forum Programming
    Replies: 3
    Last Post: 06-22-2015, 05:15 PM
  4. password before printing reports
    By pnasz in forum Programming
    Replies: 1
    Last Post: 03-12-2012, 05:46 AM
  5. Printing Reports....
    By Danny Christie in forum Reports
    Replies: 1
    Last Post: 12-06-2006, 05:51 PM

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