RDLC Report Error After Migrating To Win 10

This is my first blog on any platform but I can't stop myself from sharing my experience.

We migrated our Dev Server machine from Win 7 to Windows 10 and then suddenly RDLC reports started showing destorted UI. Its vertical scrollbar disappeared suddenly and all the data started to come in a single page only without any scrolling. 

We spent a number of days to figure out the solution for this. So, this blog might be helpful for you. As we have around 100+ reports, to change in every report by changing the CSS runtime is not a feasible solution as given by many articles to resolve it.

So, from a developer's point of view, a small trick can do the magic here and you can resolve this issue easily.

Step 1

Create a .skin file for Reports i.e. Report.skin. In this, add the below style which would resolve your problem. This theme can cover any changes required in all reports.

  1. <rswebControl:ReportViewer runat="server" Width="100%" style="overflow-y:auto;height:450px ! important;"></rswebControl:ReportViewer>  

In web.config file, under pages node, add the attribute theme as below.
  1. <pages validateRequest="false" theme="ReportTheme" >  
Also, under <Controls>, we have added tagPrefix for RDLC reports as below.
  1. <add tagPrefix="rswebControl" namespace="Microsoft.Reporting.WebForms" assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral/>  

Added this control to our main page where report needs to be displayed.
  1. <div>  
  2.    <rswebControl:ReportViewer ID="rv" runat="server">  
  3.    </rsweb:ReportViewer>  
  4. </div>  

Now, try to run it on Windows10 machine. Hope it works for you.