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
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