Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Printing Crystal Report Directly to printer

Posted on 2007-12-06
2
Medium Priority
?
463 Views
Last Modified: 2008-02-01
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
Comment
Question by:mgmhicks
  • 2
2 Comments
 
LVL 21

Accepted Solution

by:
surajguptha earned 2000 total points
ID: 20422872
www.codeproject.com/aspnet/crCode.asp
it contains code to print the report directly to the printer
0
 
LVL 21

Expert Comment

by:surajguptha
ID: 20422882
Also check this link out
http://forums.asp.net/p/1074317/1576492.aspx

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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question