Spider man
Spider man

Reputation: 3330

Nullable types in Crystal report

I am using asp.net mvc and crystal reports v.13.

i have two class which contains nullable variables.

public class CustomerList
{
    public List<customerinfo> custInfo{ get; set; }
}
public class customerinfo
{
    public string name{ get; set; }
    public Nullable<int> id { get; set; }
    public Nullable<int> age{ get; set; }
}

A list of objects of above class (CustomerList) is set in data source of crystal report.

rd.SetDataSource(rptSource);

In crystal reports i am selecting the same class from database expert using .net Objects.

Since i am using nullable variable i am getting the following error:

"DataSet does not support System.Nullable<>."

Upvotes: 0

Views: 4382

Answers (1)

Damith
Damith

Reputation: 63065

You can convert your generic list to a DataSet and set it as DataSource of the report

below answer will help you to do the conversion

Convert generic list to dataset in C#

Upvotes: 3

Related Questions