Search code examples
visual-studio-2017report-viewer2016

Visual Studio 2017 Report Viewer overrides jquery theme


I upgraded a project from VS2015 to VS2017 Community Edition and eventually got reports working again. In particular, I have Microsoft Rdlc Report Designer for Visual Studio v14.1 and Microsoft.ReportingServices.ReportViewerControl.WebForms v140.340.80 installed.

Everything works: I can edit reports in the designer, and I can display reports at runtime.

The problem: When I display a report, the report viewer overrides the CSS in the jQuery theme my project uses. My buttons, for example, change style to look very different than intended. Inspecting the web page shows the CSS is being overridden by this:

http://localhost:52800/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=14.0.340.80&Name=Microsoft.Reporting.WebForms.Styles.jquery-ui.min.css

That is, it looks like the report viewer is linking to a default jQuery theme. How do I prevent this?


Solution

  • This is a known issue - to work around the issue you might want to include the RVC on a separate page and embed via iFrame to sandbox the jQuery UI CSS.