cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Print to printer solution

Former Member
0 Likes
1,539

Is there any solution for function "print to printer" which prints on the network printer without report viewer prompting. Direct print when action run.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

I'm not really sure what version of crystal report but it come with the Visual Studio 2005, i'll get the version on monday as im in the office. I had try the code to "see" the printer on the web app but i cant "see" the network printer, all local printers are seen..i have given access even in the firewall setting to enable the printer port and enable sharing. The window test print is working fine with the printer. But when it come to web app direct print it just wont work. I'm currently using server 2003 and window xp profession.

former_member184995
Active Contributor
0 Likes

For an easy way around this, instead of hacking the registry to allow the network printers to be seen, just install the network printers as local printers via tcp/ip. That way you will be able to "see" them, they will still be the network printers, and you will be able to print to them like you would any normal local printer.

Jason

Former Member
0 Likes

I just realize that the printer on my server is not Network Printer but server shared printer. It explained a lot I can't connect the printer using TCP/IP. Any option for changing the sharing server printer to local? By the way, I'm really thankful for your team effort for solving my problem. A million thanks to you all.

Answers (2)

Answers (2)

Former Member
0 Likes

OK, sorry my English wasn't good. I'm using Asp.net web application to print reports on the network printer which located at the server..the user requested to print invoices directly to the network printer without any prompt of viewer which mean by a single click it prints, i search through the net and i found this solution "print to printer", this function work fine on local printer but when i try to print it on the client side there is this error message "The RPC server is unavailable " i had given full access to the printer on the network but it still not working. I search through net it seems to be a problem remain unsolved. So I'm here asking for solution, I need this done urgently. Thank you in advanced.

Enoch

Former Member
0 Likes

I'm not sure this is a Crystal Reports issue as such. In a nut shell, this indicates an issue communicating with the machine that has the printer installed.

Can you print to that printer using any other web app?

What version of CR are you using?

Add this code to your app to see if the app can actually "see" the printer:

Dim myPrinter As String

For Each myPrinter In System.Drawing.Printing.PrinterSettings.InstalledPrinters

Response.Write(myPrinter)

Response.Write("<BR>")

Next

Check out [this|http://support.microsoft.com/kb/184291/en-us] Microsoft kbase re. system printers

Make sure you can ping the server machine

Check that there is no firewall setting that would prevent communication with the printer

Ensure you are using correct machine name

Check the printer by printing a test page from Windows.

Make sure the printer is turned on and online.

Reinstall the printer driver.

If the OS is Vista, see [this|http://support.microsoft.com/gp/printing_problems] MS kbase

Make sure the domain controller has file and printer sharing enabled on its network card.

Ludek

former_member184995
Active Contributor
0 Likes

You will need to provide more information as to what is happening.

You can use printtoprinter without anything prompting as long as you have already passed all the information the report needs to the report object. Also you will need set permissions for the application to access the network printers since by default it wont have it (assuming it is a web app).