Switch reports if print can't print in color

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CD Tom
    Contributor
    • Feb 2009
    • 495

    Switch reports if print can't print in color

    I know this probably sounds like a dumb question but here goes. I have a report the high lights different areas of the report in colors. There is a legend at the top of the report that explains what each color represents. The problem is not all users have color printers and when the report prints some of the color areas are impossible to read. What I would like to do is be able to identify the users printer and if it has color capabilities of printing color then use the color report and if not switch to a version of the report that doesn't have the color shading. Is this possible????

    Thanks for your help as always.
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Access itself does not interrogate the Windows information about printers installed on your system. Although it would be possible to implement a Windows API call to find out whether a printer is colour-capable, the API wrapper code behind this is quite complex.

    I'd suggest that the simplest solution is to ensure that monochrome versions of your report are sufficiently readable that you don't need to know in advance whether or not the printer can print in colour. This may mean using symbols as well as colour shading to allow monochrome differentiation of what the highlights mean.

    In monochrome certain colours - red shading, say, - turn so dark that the overlaid text is not readable at all (which may be happening in your case). I would suggest that you choose much lighter highlight shades to avoid this problem, or alternatively use white for the body text in these cases, as white on red is readable and so is white on black or grey in monochrome.

    I think it wise to test all reports in monochrome before release. Even with a colour printer, users may choose to print in monochrome (or have such a policy enforced as a default) so it is unwise to assume that printing will be in colour even if the printer is colour-capable.

    -Stewart
    Last edited by Stewart Ross; Nov 19 '11, 04:27 PM.

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #3
      It is a relatively simple matter to tell if a Printer has Color Capabilities, case in point:
      Code:
      Dim prn As Printer
      
      For Each prn In Application.Printers
        With prn
          Debug.Print .DeviceName & ": " & IIf(.ColorMode = acPRCMColor, "[CAN]", "cannot") & _
                                    " Print in Color"
        End With
      Next
      OUTPUT (my PC at work):
      Code:
      \\rpacfs02\Production  HP8150 PS: cannot Print in Color
      \\rpacfs02\Veronica CP3525n: [CAN] Print in Color
      \\rpacfs02.rpac.org\Veronica CP3525n: [CAN] Print in Color
      \\rpacgc01\KC HM Canon iR3235: cannot Print in Color
      \\rpacgc01.rpac.org\HP Color LaserJet 2600n: [CAN] Print in Color
      PDF Converter: [CAN] Print in Color
      Microsoft XPS Document Writer: [CAN] Print in Color
      Microsoft Office Document Image Writer: cannot Print in Color
      Code:
      If Application.Printer.ColorMode = acPRCMColor Then
        DoCmd.OpenReport "rptColor", acViewNormal
      Else
        DoCmd.OpenReport "rptMonochrome", acViewNormal
      End If

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32662

        #4
        It's certainly good to know we have coders available that know their way around the object system as well as ADezii :-) It will also give you what you asked for.

        Nevertheless, I would not see that as a good reason to overlook Stewart's very sensible advice to design your reports with printer limitations in mind. It's a good policy to follow.

        Sometimes you get even more than you ask for here :-D A definite bonus.

        Comment

        • Stewart Ross
          Recognized Expert Moderator Specialist
          • Feb 2008
          • 2545

          #5
          As ADezii has answered the question you originally asked (and I did not know about the property concerned) I've reset the best answer and would ask you to set it to ADezii's post.

          -S

          Comment

          Working...