I get an error with Nullable when I set the data to my Crystal Report
As a data engine I use a model, it's the same model that receives the data and I set it to my Crystal Report
namespace SistemaControl_API.Models
{
public class Get_IDDepartamento
{
public int IdDepartamento { get; set; }
public int IdUnidad { get; set; }
public int IdEmpresa { get; set; }
public string NombreDepto { get; set; }
public Nullable<int> IdResponsable { get; set; }
public string Direccion { get; set; }
public string Colonia { get; set; }
public string CodigoPostal { get; set; }
public Nullable<int> CveMunicipio { get; set; }
public Nullable<int> CveEstado { get; set; }
public string Telefono { get; set; }
public string Telefono2 { get; set; }
public string Extension { get; set; }
public string Fax { get; set; }
public string FuncionPrincipal { get; set; }
public Nullable<bool> EstatusDepto2 { get; set; }
public string NUnidad { get; set; }
public string NombreEmpresa { get; set; }
public string NombreEdo { get; set; }
public string NombreMpio { get; set; }
public string Nombre { get; set; }
public string Nombre2 { get; set; }
public string Apellido1 { get; set; }
public string Apellido2 { get; set; }
}
}
thus I establish the data:
var GetList = _Departamento_Business.GetIdDepartamento(idDepto, idUnidad, idEmpresa);
var DatosDepto = Mapper.Map<List<Entidad.Get_IDDepartamento_Result>, List<Datos.Get_IDDepartamento>>(GetList);
ReportDocument rd = new ReportDocument();
rd.Load(HttpContext.Current.Server.MapPath("~/Views/Reports/CatDeptosCR.rpt"));
rd.SetDataSource(DatosDepto);
are the same data and are even of the string type, which could be happening? The weirdest thing is that they do not have null fields.