title: An error occurred during report processing. -RLDC reporting in ASP.NET MVC
body: <p>I have this action to generate reports : </p>
  
  <pre><code>  public ActionResult Report(string id)
          {
              LocalReport lr = new LocalReport();
              string path = Path.Combine(Server.MapPath("~/Report"), "Person.rdlc");
              if (System.IO.File.Exists(path))
              {
                  lr.ReportPath = path;
              }
              else
              {
                  return View("Index");
              }
              List&lt;Person&gt; cm = new List&lt;Person&gt;();
  
              var viewModel = new PersonIndexData();
  
              viewModel.People= db.Person
              .Include(k =&gt; k.Groups)
              .OrderBy(k =&gt; k.Name);
  
              cm = viewModel.People.ToList();
  
              ReportDataSource rd = new ReportDataSource("PersonDataSet", cm);
              lr.DataSources.Add(rd);
              string reportType = id;
              string mimeType;
              string encoding;
              string fileNameExtension;
  
              Warning[] warnings;
              string[] streams;
              byte[] renderedBytes;
  
              renderedBytes = lr.Render(
                  reportType,
                  null,
                  out mimeType,
                  out encoding,
                  out fileNameExtension,
                  out streams,
                  out warnings);
  
  
              return File(renderedBytes, mimeType);
          }
  </code></pre>
  
  <p>When I call this action like this : (mysite/person/report/pdf), I get this exception : </p>
  
  <blockquote>
    <p>An error occurred during report processing.
    Indicating this line : </p>
  </blockquote>
  
  <pre><code>        renderedBytes = lr.Render(
              reportType,
              deviceInfo,
              out mimeType,
              out encoding,
              out fileNameExtension,
              out streams,
              out warnings);
  </code></pre>
  
  <p>Can you tell me why I'm getting this exception in this code? It doesn't give any error and the exception is not very explanatory. I'm using EF-code first. Thank you.</p>