Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Not able to print Post Reply Post New Topic
Author Message
snufse
Newbie
Newbie


Joined: 19 Mar 2008
Location: United States
Online Status: Offline
Posts: 36
Quote snufse Replybullet Topic: Not able to print
    Posted: 09 Jun 2009 at 5:49am
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

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.