Invoke Print and Export to PDF functionality from ASP.Net button

Posted on 2012-09-13
Last Modified: 2012-09-16
I have an (visual studio 2010) page showing a report in the Crystal Reports viewer.  I am not showing the toolbar on this report so want to add two buttons to the page; "Export to PDF" and "Print".

How can this be done?
Question by:canuckconsulting
    LVL 9

    Accepted Solution


    Author Comment

    This works great but it would be better to prompt the user for a printer.  Is this possible?

    Author Closing Comment

    Worked great though could not select printer.  In the end I exported the report to stream (ExportToStream()) which I sent back in the http response.  This let the user then open, save the file and print as desired.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now