Printing using ReportViewer in Chrome and Firefox

asp.netprintingreportviewer

I have ASP.NET Webforms which is using ReportViewer control to print reports (LocalReport) and, since direct printing is not working in Chrome and Firefox, i need to add button which will somehow do it in Chrome and Firefox. Any ideas?

Best Answer

I had the same issue once and found that explicitly specifying what controls in the ReportViewer control should be shown did the trick. I also added a ScriptManager to the page. The code below works in FireFox & Chrome. Also, the ReportViewer control has issues with other browsers when used in conjunction with UpdatePanels. Depending on how your markup is setup, these might be your issues.

    <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"
        InteractiveDeviceInfos="(Collection)" ProcessingMode="Remote" WaitMessageFont-Names="Verdana"
        WaitMessageFont-Size="14pt" ShowExportControls="true" Width="1280px" Height="700px"
        ShowBackButton="true" ShowToolBar="true" ShowParameterPrompts="true" ShowPageNavigationControls="true"
        ZoomMode="Percent" ZoomPercent="100" ShowReportBody="true" InternalBorderStyle="Solid">
    </rsweb:ReportViewer>

Some issues such as ActiveX occur with older versions of the reporting controls. You can find out which version by looking in the web.config file. Version 8 and lower have this issue.

    <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

Workarounds can be found here: ReportViewer Client Print Control “Unable to load client print control”?