Solved

Printing Crystal Report Directly to printer

Posted on 2007-12-06
2
455 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 21

Accepted Solution

by:
surajguptha earned 500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

752 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