Search code examples
c#data-bindingreporting-services

Binding C# object as datasource To A SSRS Report


I've a C# object like:

public class PersonDetails
{
    public string Name1{get; set;}
    ... ... ...
    public string Name2{get; set;}
    ... ... ...
    public string Name2{get; set;}
    ... ... ...
}

I want to bind a collection of this class to a SSRS report:
SSRS_Report

Those are all text boxes. But the report ultimately shows the first item in the collection. I'm binding the report like this:

    this.PersonDetailsPostBindingSource.DataSource = _personDetailsPostCollection.PersonDetailsPostList;

    this.reportViewerPersonDetailsPost.RefreshReport();

Where PersonDetailsPostList is a list of the class objects.

Please help. Thanks in advance.


Solution

  • I am thinking its bc you are using =First(...) in your RDL First always gives you the first item in the list.