Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 465
  • Last Modified:

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.ConnectionInfo = crConnectionInfo
                crSubTable.ApplyLogOnInfo(crTableLogOnInfo)
            Next
        Else
        End If

        mem = crReport.ExportToStream(ExportFormatType.PortableDocFormat)
        Response.Clear()
        Response.Buffer = True
        Response.ContentType = "application/pdf"
        Response.BinaryWrite(mem.ToArray)
        Response.End()
0
mgmhicks
Asked:
mgmhicks
  • 2
1 Solution
 
surajgupthaCommented:
www.codeproject.com/aspnet/crCode.asp
it contains code to print the report directly to the printer
0
 
surajgupthaCommented:
Also check this link out
http://forums.asp.net/p/1074317/1576492.aspx

Has a lot of discussion around the subject...
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now