View Single Post
  #1 (permalink)  
Old September 13th, 2006, 05:59 AM
monika.vasvani monika.vasvani is offline
Authorized User
Points: 493, Level: 7
Points: 493, Level: 7 Points: 493, Level: 7 Points: 493, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2006
Location: gandhinagar, gujarat, India.
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Default Printing Crystal report thro' ASp.Net

Hi,

I am develpoing an intranet application using ASP.Net which uses crystal reports. The IIS is installed in my machine. But the printer is connected to some other. When I try to take printout it raises an error as:

Error in File C:\inetpub\wwwroot\Temprt.rpt: Request cancelled by the user.

The code I used is:

crpt.PrintOptions.PrinterName = "\\geo01\hp LaserJet 1300 PCL 6"
crpt.PrintToPrinter(1, False, 1, 1)

Note: This code works when I connect & install the printer to my machine.

Can any one please say me how to fix this problem.

Thanx
monika.