R – Override the Refresh Crystal Report that brings up their criteria page

crystal-reportsnet

I have a vb.net winforms application.

I have created a criteria form that populates parameters in a Crystal Report. These parameters are pretty simple, IE customerId, StartDate, EndDate, etc…

This works fine, but if the user presses the crystal reports "Refresh" button on the CrystalReportViewer control then the CrystalReports criteria page displays. Obviously my user doesn't know the CustomerId so I'd rather not display this screen.

Is there a way to override the CR criteria page with my own? Failing that, can I disable that option on the CrystalReportViewer?

Best Answer

You don't say which version of Visual Studio or Crystal Reports, but the Viewer control should have a property called ShowRefreshButton.

Alternatively, there is also a ReportRefresh event which will fire when you click the button, but I think this will be fired when you initially load the report as well so you'll need to selectively override it by setting e.Handled to True.

Related Topic