Closed surgical closed 7 years ago
Given that the report viewer is a WebForms control, and the print button itself is an ActiveX control, I'd be surprised if it actually works, even when the button is displayed. Does it?
Print buttons is supported only in IE because it is an ActiveX control. I have done a work around in https://github.com/ilich/MvcReportViewer/blob/master/MvcReportViewerExample/Scripts/MvcReportViewer.js file to allow downloading file as PDF if you need to print it in Chrome or Firefox. I'd suggest to put a breakpoint there and see what is in your HTML DOM. I think there might be a conflict caused by other HTML on your website.
Having a problem trying to display a printing button on a report that is being viewed by a non-ie browser.
My Code,
@Html.MvcReportViewerFluent(Model.Path).Attributes(new { Width = "100%", Height ="1200", }).ControlSettings(settings)
This brings back my report fine but without a print button on non-ie browsers, the only way I've found to fix this is by adding a parameter value like such,
@Html.MvcReportViewerFluent(Model.Path).Attributes(new { Width = "100%", Height ="1200" }).ControlSettings(settings).ReportParameters(new { ShowDetails = "Y"})
It works and loads the print button fine, but problem is i can't hard code a parameter value for every report i'm listing.
Any ideas?