title: Infinite Loop with ReportViewer and Global.System.Diagnostics.DebuggerNonUserCodeAttribute
body: <p>I've written a simple webForm that contains 1 textbox and a ReportViewer (created by Reoprt Wizard).  I'm receiving no errors when attempting to execute the report, but the report never stops loading.  I've double checked the .rdlc file (by previewing the .xsd file and it displays the expected data.  So, I set up a breakpoint in my code behind to see if I could identify the problem.  Somehow, the code successfully completes and refreshes the ReportViewer code, and then goes into a Designer.vb file to run 4 functions, and then back to the ReportViewer code again.  I don't understand what is happening in the Designer.vb code.  Could someone please help me understand what I've done wrong?  I'll include the ASP.net, vb code behind, and the 4 blocks of code from the Designer.vb file.</p>
  
  <p>ASP.net Code:</p>
  
  <pre><code>    &lt;%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/HRMaster.Master" CodeBehind="VacationSick_EmployeeReportByArea.aspx.vb" Inherits="CEI_PerformanceReviews.VacationSick_EmployeeReportByArea" %&gt;
      &lt;%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %&gt;
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"&gt;
  &lt;/asp:Content&gt;
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="HRPlaceHolder" runat="server"&gt;
      &lt;asp:Label ID="Label2" runat="server" style="z-index: 1; left: 74px; top: 215px; position: absolute" Text="Year:"&gt;&lt;/asp:Label&gt;
      &lt;p&gt;
      &lt;/p&gt;
      &lt;asp:DropDownList ID="ddl_Year" runat="server" DataSourceID="YearChooser" DataTextField="PeriodYYYY" DataValueField="PeriodYYYY" style="z-index: 1; left: 129px; top: 214px; position: absolute"&gt;
      &lt;/asp:DropDownList&gt;
      &lt;asp:SqlDataSource ID="YearChooser" runat="server" ConnectionString="&lt;%$ ConnectionStrings:CafeWorksConnectionString %&gt;" SelectCommand="SELECT  DISTINCT PeriodYYYY
  FROM    Ted.CafeWorks.dbo.FatzPeriodDates
  WHERE   PeriodYYYY &amp;gt;= (DATEPART(YEAR, GetDate())-2)
  ORDER BY PeriodYYYY DESC"&gt;&lt;/asp:SqlDataSource&gt;
      &lt;asp:Button ID="btn_Refresh" runat="server" style="z-index: 1; left: 269px; top: 212px; position: absolute" Text="Refresh" /&gt;
      &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
      &lt;/asp:ScriptManager&gt;
      &lt;asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="XX-Large" ForeColor="#000099" style="z-index: 1; left: 0px; top: 142px; position: absolute; width: 1179px; text-align: center" Text="Employee Vacation/Sick Days by Area Report"&gt;&lt;/asp:Label&gt;
      &lt;rsweb:ReportViewer ID="rv_EmployeeReportByArea" runat="server" Font-Names="Verdana" Font-Size="8pt" style="z-index: 1; left: 29px; top: 280px; position: absolute; height: 400px; width: 710px" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"&gt;
          &lt;LocalReport ReportEmbeddedResource="CEI_PerformanceReviews.VacationSick_ReportByArea.rdlc"&gt;
              &lt;DataSources&gt;
                  &lt;rsweb:ReportDataSource DataSourceId="ObjectDataSource2" Name="Dilbert_VacationSickByArea" /&gt;
              &lt;/DataSources&gt;
          &lt;/LocalReport&gt;
      &lt;/rsweb:ReportViewer&gt;
      &lt;asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetData" TypeName="CEI_PerformanceReviews.Dilbert_VacationSickByAreaTableAdapters.VacationSick_CalculationsByAreaProcTableAdapter" OldValuesParameterFormatString="original_{0}"&gt;
          &lt;SelectParameters&gt;
              &lt;asp:ControlParameter ControlID="ddl_Year" DefaultValue="2014" Name="Year" PropertyName="SelectedValue" Type="String" /&gt;
          &lt;/SelectParameters&gt;
      &lt;/asp:ObjectDataSource&gt;
      &lt;asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetData" TypeName="CEI_PerformanceReviews.Dilbert_VacationSickByAreaTableAdapters.VacationSick_CalculationsByAreaProcTableAdapter" OldValuesParameterFormatString="original_{0}"&gt;
          &lt;SelectParameters&gt;
              &lt;asp:ControlParameter ControlID="ddl_Year" Name="Year" PropertyName="SelectedValue" Type="String" /&gt;
          &lt;/SelectParameters&gt;
      &lt;/asp:ObjectDataSource&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>VB Code Behind:</p>
  
  <pre><code>Imports Microsoft.Reporting.WebForms
  
  Public Class VacationSick_EmployeeReportByArea
  Inherits System.Web.UI.Page
  
  'Declare Variables
  Dim Choose_Year As String
  
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      'Default the Year in ddl to this year
      If (Page.IsPostBack) = False Then
          ddl_Year.SelectedValue = Now.Year
      End If
  
      'When the page loads, fill the report with the current year's data
      Choose_Year = ddl_Year.SelectedValue.ToString()
      rv_EmployeeReportByArea.LocalReport.ReportPath = "VacationSick\VacationSick_ReportByArea.rdlc"
      Dim Param As New ReportParameter("Year", "2014")
      rv_EmployeeReportByArea.LocalReport.SetParameters({Param})
      rv_EmployeeReportByArea.ServerReport.Refresh()
  End Sub
  </code></pre>
  
  <p>These 4 Code Blocks from the file Dilbert_VacationSickByArea.Designer.vb are executed and then it goes back to the PageLoad code for the ReportViewer:</p>
  
  <pre><code>&lt;Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
           Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")&gt;  _
          Public Property ClearBeforeFill() As Boolean
              Get
                  Return Me._clearBeforeFill
              End Get
              Set
                  Me._clearBeforeFill = value
              End Set
          End Property
  
  
   &lt;Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
           Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")&gt;  _
          Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
              Get
                  If (Me._adapter Is Nothing) Then
                      Me.InitAdapter
                  End If
                  Return Me._adapter
              End Get
          End Property
  
  
   &lt;Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
           Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")&gt;  _
          Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
              Get
                  If (Me._commandCollection Is Nothing) Then
                      Me.InitCommandCollection
                  End If
                  Return Me._commandCollection
              End Get
          End Property
  
  
   &lt;Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
           Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")&gt;  _
          Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
              Get
                  If (Me._adapter Is Nothing) Then
                      Me.InitAdapter
                  End If
                  Return Me._adapter
              End Get
          End Property
  
  
   &lt;Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
           Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")&gt;  _
          Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
              Get
                  If (Me._adapter Is Nothing) Then
                      Me.InitAdapter
                  End If
                  Return Me._adapter
              End Get
          End Property
  </code></pre>