Printint on dot matrix printer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ypytt
    New Member
    • Jul 2008
    • 8

    Printint on dot matrix printer

    Hi all,
    I'm developing a Windows application in C#. It generates reports using ReportViewer. These reports should be printed on a dot matrix printer. However, there is a problem.
    The application runs on multiple computers connected in a local network, the printer is connected to the network also. When the report is generated and the Print button from the toolstrip of the ReportViewer control is pressed, the default Print dialog appears. When the matrix printer is selected and Print is pressed, the application crashes showing the Windows error message (the one asking to send error to Microsoft).
    However, there are some things I noticed:
    1. The error appears only on some computers in the network. From the other computers, the printing on dot matrix printer runs fine.
    2. Printing on a laser printer (also a network printer) is succesful on the computers where the printing with dot matrix printer fails.
    3. Printing on the dot matrix printer is succesful from other applications on these computers.
    4. All computers have the same operating system and the same version of my application.
    Could anyone give me advise on how to approach the problem? I cannot debug this one because I'm using the functionality of the ReportViewer control for printing and actually don't have any source code to debug :).
  • pootle
    New Member
    • Apr 2008
    • 68

    #2
    look at the system error logs in the event viewer. There is certainly an exception reported there - whenever you see the "report error to microsoft" dialog, it is because of an unhandled exception.

    Comment

    • ypytt
      New Member
      • Jul 2008
      • 8

      #3
      The event report contains the following info:
      Faulting application office.exe (the name of my appliaction), faulting module ntdll.dll. This is a Windows dll, and I couldn't fnd anything related that could help me.
      Meanwhile, I figured out the following:
      1. Only Administrators can print, however, all users have full permissions on the printer
      2. The problem is obviously with the paper size: the printer has default paper size Fanfold, and the page size in the ReportViewer is Letter. When I change it to Fanfold before printing, it runs fine. However, I cannot do this manually every time. How can I do this programatically ?

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        I think there is a PrintDocument object somewhere in there that can be used to set the properties of the printing object. Such as page size, orientations, header/footer size, etc.
        It may also be possibly to (outside of code) manually go in and examine the properties of the "printer" on the computers (like under "printers and faxes") and change the defaulted paper type for the dot-matrix printers to be fanfold?

        Comment

        Working...