Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not able to print document

Status
Not open for further replies.

snufse1

Programmer
Nov 14, 2008
66
US
I have an ASP application where I print the Crystal Report using a print button. When I run the app on my local PC it prints fine, when I run the app from the server it does not print (but gives me message that document is printed). Aany ideas?

Private Sub Print_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Print_Button.Click

Message = PrintDocument()

ASPNET_MsgBox_Alert(Message)

End Sub



Public Function PrintDocument() As String

myCrystalReport1 = Session("myCrystalReport1")

Try

myCrystalReport1.PrintToPrinter(1, False, 0, 0)

Message = "Daily Sales Report printed OK"

Catch ex As Exception

Message = "Not able to print document"

End Try

myCrystalReport1 = Session("myCrystalReport1")

CrystalReportViewer1.ReportSource = myCrystalReport1

Return (Message)

End Function
 
Hi,
Are the same printer drivers installed on the server and does the app have rights to use the server's printer?




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi,
Glad to help..Been there , done that [wink]




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top