Using List control to show 1 to n related information in a repeated manner in SSRS report.

 

Suppose these are our two tables, Person and Person Details, having one to many relationships to each other.

Person:-

Person details:-

Now here we would like the report to show data in the following format (in repeated fashion)

1st record of Person Table

All details of that record

2nd record of Person Table

All details of that record

Now first create a report having following simple query for the data set

SELECT Id, [First Name], [Last Name], Email FROM Person

Now create one more report which we would be using as a Subreport with the following query

SELECT Hobby FROM [Person Details] WHERE (Id = @Id)

Now go to our main report,

Add a List Control to the report.

Drag the fields from the DataSet of the main Person table to the report.

Next drag the Subreport control inside the list control of the report.

Specify properties for the Subreport.

Refer to my previous post for that (little lazy to put those stuffs again)

https://nishantrana.wordpress.com/2011/08/20/using-subreport-control-to-show-1-to-n-related-information-in-ssrs-report/

Our final report would look like this.

Hope it is helpful.


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

One thought on “Using List control to show 1 to n related information in a repeated manner in SSRS report.”

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s