title: C# - Reporting Services (rdlc) - Error: Object reference not set to an instance of an object
body: <p>I'm quite new in using <strong>Reporting Services</strong>, and I'm currently facing this problem:</p>
  
  <p>I have two report files (.rdlc). One of them was made by one partner of mine in my entreprise, the other by me. I want to Add a new Dataset to my report, so I can use it in a Tablix. The <em>Data source</em> is correct, but in the <em>Available datasets</em> dropdown, the object I want <strong>(Indicator4Report)</strong> is not present <a href="https://i.stack.imgur.com/TXMqM.png" rel="nofollow noreferrer">1</a>:</p>
  
  <p><a href="https://i.stack.imgur.com/TXMqM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TXMqM.png" alt="Available datasets not showing Indicator4Report"></a></p>
  
  <p>If I press the <em>New...</em> button, and then the <em>Object</em> button, I can find the object I want to add as dataset <a href="https://i.stack.imgur.com/F3y7Y.png" rel="nofollow noreferrer">2</a>:</p>
  
  <p><a href="https://i.stack.imgur.com/F3y7Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F3y7Y.png" alt="Object I want to add"></a></p>
  
  <p>But clicking it shows this error: <code>object reference not set to an instance of an object</code> <a href="https://i.stack.imgur.com/X7QB7.png" rel="nofollow noreferrer">4</a></p>
  
  <p><a href="https://i.stack.imgur.com/X7QB7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X7QB7.png" alt="Object reference not set to an instance of an object error"></a></p>
  
  <p>The object is declared in the file <code>Foo.Weee.Logic.ViewModels.Advisor</code>, which looks like this:</p>
  
  <pre><code>using System;
  using Newtonsoft.Json;
  using Newtonsoft.Json.Converters;
  using System.Collections.Generic;
  using System.Linq;
  
  namespace Foo.Weee.Logic.ViewModels.Advisor
  {
      public class ResultsSummary
      {
         public string blabla {get;set;}
         ...more attributes...
      }
  
      ...more objects...
  
      public class ResultsSummary4Report
      {
          public ResultsSummary4Report(ResultsSummary results)
          {
              this.blabla = results.blabla;
              ...more code...
              this.indicatorBlabla = new Indicator4Report[] //The object I want
              {
                  new Indicator4Report() { title = "Profesional Independiente", value = 7.5f , color1 = "red", color2 = "gray" }
              };
              ...more code...
          }
  
          public string blabla {get;set;}
  
          ...more attributes...
  
          public Indicator4Report[] indicatorBlabla {get;set;} //The object I want
  
          ...more attributes...
     }
  
     ...more objects...
  
     /* The object I want */
     public class Indicator4Report
     {
        public string title { get; set; }
        public float value { get; set; }
        public string color1 { get; set; }
        public string color2 { get; set; }
     }
  }
  </code></pre>
  
  <p>As I said, I'm new to this, so maybe it is a dumb mistake or something I'm doing wrong, but I don't know how to tackle the problem.</p>
  
  <p>Thank you very much for your help, and if you need more info, code or screenshots, feel free to ask.</p>
  
  <p>PS: I'm using Visual Studio 2015</p>