title: WinForms ReportViewer hangs the app WPF
body: <p>I've been experiencing some problems with the ReportViewer. Basically the code is the following:</p>
  
  <pre><code>public void Display(object dataSource, ReportViewer viewer)
      {
          currentDs = dataSource as MyTypes;
  
          if (currentDs != null)
          {
              var param = new LinkedList&lt;ReportParameter&gt;();
              param.AddFirst(new ReportParameter("Title", "Title"));
              viewer.ProcessingMode = ProcessingMode.Local;
              viewer.LocalReport.ReportEmbeddedResource = ReportName;
              viewer.LocalReport.EnableExternalImages = true;
              viewer.LocalReport.DataSources.Add(new ReportDataSource(DataSourceName + "_Header", currentDs.Header));
              viewer.LocalReport.DataSources.Add(new ReportDataSource(DataSourceName + "_Footer", currentDs.Footer));
              viewer.LocalReport.DataSources.Add(new ReportDataSource(DataSourceName + "_Lines", currentDs.Lines));
  
              viewer.LocalReport.SetParameters(param);
              viewer.RefreshReport();
          }
      }
  </code></pre>
  
  <p>The problem is that sometimes it generates the rdlc report but others it just hangs the application. Specifically, it stays in viewer.RefreshReport(); forever.</p>
  
  <p>The corresponding parameters and datasets are correctly set on the rdlc file.</p>
  
  <p>Has anyone experienced a similar behavior?</p>
  
  <p>Thanks in advance.</p>