SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to set a particular printer in reportviewer code c#


How to set a particular printer in reportviewer code c#

Author
Message
stuartf 70178
stuartf 70178
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 12
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
davoscollective
davoscollective
SSC Eights!
SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)

Group: General Forum Members
Points: 941 Visits: 1004
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.
stuartf 70178
stuartf 70178
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 12
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.
jims 66110
jims 66110
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 6
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search