How to set a particular printer in reportviewer code c#

  • Hi, we have a requirement where one of our departments needs to annually select a variable number assets for revaluation, then print off certificates of asset information for posting.

    We have a gridview with checkboxes where this selection can be made and saved.

    On clicking of the print icon we loop through the gridview grab the Asset ID and send a report to print via a report Viewer and a ReportPrintDocument class whenever a checkbox is selected.

    This is working fine on my development box but on our virtual web server we get an error message saying no printers installed.

    We really need to specify a particular printer on a certain floor to print to.

    I would appreciate any help in doing this or even a better way of batch printing if one is available.

    Cheers in advance

  • Two thoughts come to mind. Firstly you need to make sure the web server has the appropriate print drivers installed. They are usually different versions to your client machines (e.g. your dev machine) If you log onto the server and try printing e.g. a text file manually it will confirm to you whether printers are installed on there.

    Is the web server in a DMZ by any chance? If it is sitting on the other side of a firewall to your internal network where your printers reside you might need to allow it through the firewall.

  • Yes, we actually installed a remote printer on our web server and set it as default but it did not make any difference, the app still found no printers.

    The web server is on an corporate network not a dmz.

    We think we have found a workaround by building a continious query that loads a single report with the certificate records as pages (using a page break), the client can then use the built in print icon to select a printer and print them all in one go.

    It still needs to be tested in a production environment.

    Would be nice to have a batch print option. It is quite a common scenario so surprised MS have not included this option, this would make a very good product into an excellent one.

  • Did you install the required network printers as local printers on the Web server? IMHO, there is no out of the box way to select a printer unless they are defined locally. This works great for us in a very similar type of process that you are using.

    Your clients will have to agree to the printers being installed on the Web box.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply