mgmhicks
asked on
Printing Crystal Report Directly to printer
I am using the following code to bring up a crystal report in a acrobat reader format and display it in the browser. What I would like to do is take same report, but do not display it, just print it direclty to their default printer. Here is the existig codel
Dim msubReport = crReport.Subreports.Item(0 )
Dim crSubDatabase = crReport.Subreports.Item(0 ).Database
Dim crSubTables = crReport.Subreports.Item(0 ).Database .Tables
Dim crSubTable As Table
mSubCount = crReport.Subreports.Count
If mSubCount > 0 Then
For Each crSubTable In crSubTables
crTableLogOnInfo = crSubTable.LogOnInfo
crTableLogOnInfo.Connectio nInfo = crConnectionInfo
crSubTable.ApplyLogOnInfo( crTableLog OnInfo)
Next
Else
End If
mem = crReport.ExportToStream(Ex portFormat Type.Porta bleDocForm at)
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/pdf"
Response.BinaryWrite(mem.T oArray)
Response.End()
Dim msubReport = crReport.Subreports.Item(0
Dim crSubDatabase = crReport.Subreports.Item(0
Dim crSubTables = crReport.Subreports.Item(0
Dim crSubTable As Table
mSubCount = crReport.Subreports.Count
If mSubCount > 0 Then
For Each crSubTable In crSubTables
crTableLogOnInfo = crSubTable.LogOnInfo
crTableLogOnInfo.Connectio
crSubTable.ApplyLogOnInfo(
Next
Else
End If
mem = crReport.ExportToStream(Ex
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/pdf"
Response.BinaryWrite(mem.T
Response.End()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://forums.asp.net/p/1074317/1576492.aspx
Has a lot of discussion around the subject...