title: .NET ReportViewer Error - Only when running from Server, not from Visual Studio IDE
body: <p>I am getting client rendering error for one of my report. I am getting this error only when running from our Testing Server, the report runs fine in my development environment (i.e from my local machine Visual Studio IDE).</p>
  <p>Below are the details of the error. I am totally stuck as I am not able to make anything out of the stack trace. What should be my next step?</p>
  <p><strong>ASPX Code:</strong></p>
  <pre><code>&lt;rsweb:ReportViewer ID=&quot;rptvwReport&quot; runat=&quot;server&quot; InteractiveDeviceInfos=&quot;(Collection)&quot;&gt;
  &lt;LocalReport ReportPath=&quot;Reports\ChartReport.rdlc&quot;&gt;&lt;/LocalReport&gt;
  &lt;/rsweb:ReportViewer&gt;
  </code></pre>
  <p><strong>ASPX.CS Code:</strong></p>
  <pre><code>ReportDataSource rdsReport = new ReportDataSource();
  rdsReport.Value = myDataList;//List&lt;Data&gt;
  rdsReport.Name = &quot;DS&quot;;
  rptvwReport.LocalReport.ReportPath = HttpContext.Current.Request.MapPath(HttpContext.Current.Request.ApplicationPath) + @&quot;/Reports/ChartReport.rdlc&quot;;
  rptvwReport.LocalReport.DataSources.Add(rdsReport);
  rptvwReport.LocalReport.Refresh();
  </code></pre>
  <p><strong>Note:</strong> I am using Visual Studio 2010 &amp; SQL Server 2008. For testing purpose I am using same database for both Development &amp; Testing environment.</p>
  <blockquote>
  <p><em><strong>Error Message:</strong> An error occurred during client rendering.</em></p>
  <p><em><strong>Inner Exception:</strong> Object reference not set to an instance of an object.</em></p>
  <p><em><strong>StackTrace:</strong> at Microsoft.Reporting.WebForms.LocalHtmlRenderer.Render(NameValueCollection deviceInfo, PageCountMode pageCountMode, ReportControlSession reportControlSession, CreateAndRegisterStream streamCallback, String&amp; scrollScript, String&amp; pageStyle) at Microsoft.Reporting.WebForms.ReportControlSession.RenderReportHTML4(NameValueCollection deviceInfo, PageCountMode pageCountMode, String&amp; scrollScript, String&amp; pageStyle) at Microsoft.Reporting.WebForms.ReportControl.RenderReport(ReportControlSession session, String viewerInstanceIdentifier, PageCountMode pageCountMode, Int32 pageNumber, InteractivityPostBackMode interactivityMode, SearchState searchState, String replacementRoot, String hyperlinkTarget, ScrollTarget scrollTarget, String alertMessage, DeviceInfoCollection initialDeviceInfos, String browserMode, Boolean sizeToContent) at Microsoft.Reporting.WebForms.ReportArea.RenderReport(ReportControlSession session, String viewerInstanceIdentifier, PageCountMode pageCountMode, Int32 pageNumber, InteractivityPostBackMode interactivityMode, SearchState searchState, String replacementRoot, String hyperlinkTarget, ScrollTarget scrollTarget, String alertMessage, DeviceInfoCollection initialDeviceInfos, String browserMode, Boolean sizeToContent) at Microsoft.Reporting.WebForms.ReportViewer.RenderReport(Boolean updateDocMap) at Microsoft.Reporting.WebForms.ReportViewer.OnPreRender(EventArgs e)</em></p>
  </blockquote>