Share via

How to detect crystal report print button when clicked

Benniit 1 Reputation point
2021-07-23T14:24:14.807+00:00

Please I have Vb.net 2019 and crystal report and I use the following codes to show the report without any problem. Now, I want to know when the printer button is clicked so that I can set a condition. So is there any event of the Report Viewer that I can detect the print button when clicked?

 Dim Report As New CrystalDecisions.CrystalReports.Engine.ReportDocument
                Report.Load(ReportPath) ', CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)
                AssignReportConnection(Report)
                Report.Database.Tables("RentAssessment").SetDataSource(Table)
                'View the report document
                frmRentViewer.Viewer.ReportSource = Report
                frmRentViewer.Viewer.RefreshReport()
                frmRentViewer.Show()
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.