title: Report Viewer #Error on table
body: <p><img src="https://i.stack.imgur.com/oKkBz.jpg" alt="enter image description here"></p>
  
  <p>Hello.</p>
  
  <p>Does anyone know how to find why there is a #error instead of data on my report? The report was working just fine until today, i haven't changed anything on the code and now i get this #error thing. How can i debug it and see where is the cause of it? I have debugged my code and i got no exception in it. The code im using to load the report is:</p>
  
  <pre><code>public static bool LoadSurveillanceDataInReport(ref ReportViewer rpt, DateTime dStart, DateTime dEnd, double kilometersDroven)
          {
              try
              {
                  reportPath = @"C:\MSRDS4\bin\Reports\SurveillanceReport.rdlc";
                  pdfName = "Surveillance_Report_" + dStart.ToShortDateString().Replace('/', '_').Replace('-', '_');
  
                  bool hasDetections = false;
                  bool hasTaken = false;
  
                  //Get Surveillance data
                  IList&lt;ClsSurveillanceTasks&gt; surveillanceTasks = GetTaskData(dStart.Date.ToString("yyyy-MM-dd"), dEnd.Date.ToString("yyyy-MM-dd"));
                  if (surveillanceTasks == null)
                      return false;
                  else if (surveillanceTasks.Count &gt; 0)
                      hasTaken = true;
  
  
                  IList&lt;ClsSurveillanceDetections&gt; surveillanceDetection = GetDetectionData(dStart.Date.ToString("yyyy-MM-dd"), dEnd.Date.ToString("yyyy-MM-dd"));
                  if (surveillanceDetection == null)
                      return false;
                  else if (surveillanceDetection.Count &gt; 0)
                      hasDetections = true;
  
                  IList&lt;ClsSurveillanceRobotStatus&gt; surveillanceRobotStatus = GetRobotStatusData(dStart.Date.ToString("yyyy-MM-dd"), dEnd.Date.ToString("yyyy-MM-dd"), kilometersDroven);
                  if (surveillanceRobotStatus == null)
                      return false;
  
                  //reset report
                  rpt.Reset();
                  rpt.LocalReport.DataSources.Clear();
  
                  //set dataset
                  var rDSTasks = new ReportDataSource { Value = surveillanceTasks, Name = "dsTasks" };
                  rpt.LocalReport.DataSources.Add(rDSTasks);
  
                  var rDSDetections = new ReportDataSource { Value = surveillanceDetection, Name = "dsDetections" };
                  rpt.LocalReport.DataSources.Add(rDSDetections);
  
                  var rDSRobotStatus = new ReportDataSource { Value = surveillanceRobotStatus, Name = "dsRobotStatus" };
                  rpt.LocalReport.DataSources.Add(rDSRobotStatus);
  
                  //Set report path
                  rpt.LocalReport.ReportPath = reportPath;
  
                  //Parameters
                  var reportDate = dStart.Date;
                  var monthName = new DateTime(reportDate.Date.Year, reportDate.Date.Month, reportDate.Date.Day).ToString("MMM", System.Globalization.CultureInfo.InvariantCulture);
  
                  var formatedDate = reportDate.Date.Day + " " + monthName + " " + reportDate.Date.Year;
                  var rptParams = new ReportParameter[] { 
                  new ReportParameter("nowDate", formatedDate),
                  new ReportParameter("Company", company), 
                  new ReportParameter("Adres", adres), 
                  new ReportParameter("Postcode", postcode), 
                  new ReportParameter("Place", place), 
                  new ReportParameter("hasDetections", hasDetections.ToString()), 
                  new ReportParameter("hasTaken", hasTaken.ToString())
                  };
  
                  rpt.LocalReport.SetParameters(rptParams);
  
                  try
                  {
                      //Set page Settings to prevent big margins
                      var pg = new System.Drawing.Printing.PageSettings
                      {
                          Margins = { Top = 16, Bottom = 16, Left = 16, Right = 16 }
                      };
  
                      rpt.SetPageSettings(pg);
                  }
                  catch (Exception ex)
                  {
                      LogHandler(ex);
                  }
  
                  return true;
              }
              catch (Exception ex)
              {
                  LogHandler(ex);
                  return false;
              }
          }
  </code></pre>
  
  <p>GetTaskData is returning data and there is no nulls in it.</p>
  
  <p>Any help will be appreciated! Thank you</p>