Is it possible to catch the print button click event with CrystalReportViewer in Winforms

Posted on 2006-03-21
Last Modified: 2008-01-09
I have a CrystalReport viewer set in a winForms based application.
We would like to track the number of times a report gets printed.

For this we need to capture the click of the print button on the toolbar of the reportviewer to verify that the print has actually occured, Is this possible at all?

If yes, how can this be done. Any sample code would be great

Amit Acharya
Question by:AmitBAcharya
    LVL 100

    Expert Comment

    Which viewer?  What code are you using to display the report?

    On some viewers it is possible to since there is a CLICK event for the print button.  If that doesn't exist for your viewer then you will need to create your own print button and include the code you need to count the prints.


    Author Comment

    I am using the standard Crystal.NET ReportViewer in CR9.1 that comes along with VS.NET 2003
    LVL 8

    Accepted Solution

    AmitBAcharya, if you are using .net and using its CrystalReportViewer, you have to override the CrystalReportViewer class, and override the PrintReport() function. Please let me know if you need further help.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    737 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

    16 Experts available now in Live!

    Get 1:1 Help Now