user3403034
user3403034

Reputation: 1

rdlc subreport in mvc3

    public class Product
    {
        public string name { get; set; }
        public IList<PDetail> p_details { get; set; }
    }
    public class PDetail 
    {
        public string detail_name { get; set; }
    }

I have an object structure as above. I want to create rdlc report using this structure. I can use in the DataSet

    IList<Product> dataset = new List<Product>();

How can I do report to this dataset in report viewer(.rdlc). I use to mvc.

Upvotes: 0

Views: 968

Answers (1)

Raphael
Raphael

Reputation: 1687

I'm sorry but you can't. Sql Reporting does not support nested object lists. I searched a lot for a solution to this problem. And the only thing I came around was to create a report, and inside of that a sub report to which i pass the child list of data. I found an article that explains how to do that, I hope this link can hel you to.

Reporting against a domain model

What's possible, and i you may need in the future, is to use a nested object, by serializing the the classes. you can see in this blog article how to do that.

ReportViewer - object datasource, nested objects

Upvotes: 1

Related Questions