title: DataSet does not support System.Nullable<> in Export
body: <p>I was trying to generate a Report using Export to Excell, PDF, TextFile. Well I am doing this in MVC. I have a class which I named SPBatch (which is the exact name of my Stored Procedure in my SQL) and it contains the following:</p>
  
  <pre><code>public string BatchNo { get; set; }
  public string ProviderName { get; set; }
  public Nullable&lt;System.Int32&gt; NoOfClaims { get; set; }
  public Nullable&lt;System.Int32&gt; TotalNoOfClaims { get; set; }
  public Nullable&lt;System.Decimal&gt; TotalBilled { get; set; }
  public Nullable&lt;System.Decimal&gt; TotalInputtedBill { get; set; }
  public Nullable&lt;System.DateTime&gt; DateCreated { get; set; }
  public Nullable&lt;System.DateTime&gt; DateSubmitted { get; set; }
  public Nullable&lt;System.DateTime&gt; DueDate { get; set; }
  public string Status { get; set; }
  public string RefNo { get; set; }
  public string BatchStatus { get; set; }
  public string ClaimType { get; set; }
  </code></pre>
  
  <p>as you can see some of my Columns are declared as Nullable. It went smoothly from searching and displaying the results in a table. I have several buttons below which are image buttons for export and every time I try to export in Excel, I always get the problem "<strong>DataSet does not support System.Nullable&lt;></strong>" in this part of my code:</p>
  
  <pre><code>foreach (MemberInfo mi in miArray)
  {
      if (mi.MemberType == MemberTypes.Property)
      {
          PropertyInfo pi = mi as PropertyInfo;
          dt.Columns.Add(pi.Name, pi.PropertyType); //where the error pop's up.
  
      }
      else if (mi.MemberType == MemberTypes.Field)
      {
          FieldInfo fi = mi as FieldInfo;
          dt.Columns.Add(fi.Name, fi.FieldType);
      }
  }
  </code></pre>
  
  <p>the error shows up on the one with a comment. Can you help me what to do? I tried adding  DBNull in my code but still I get the same error. I tried removing Nullable in my SPBatch but I get an error that some tables are need to be declared as Nullable. </p>
  
  <p>What should I do?</p>