Arnab Das
Arnab Das

Reputation: 3718

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.

Upvotes: 0

Views: 1156

Answers (1)

Muad'Dib
Muad'Dib

Reputation: 29196

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

Upvotes: 1

Related Questions