Click here to Skip to main content
13,091,300 members (48,886 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I have a question about the RDLC within Visual Studio. I have a list where I show data. Now within that list I want to make another list that uses a variable from the first list (a foreign key) to get data in the second list (primary key). How can I link these two so it will work?


I have a RDLC file. In this file I want to show data. I have a list (List A) which shows data from datasource, which gets data from Column 1. Within List A I want to have another list (List B) which shows data from a datasource that gets data from Column 2. I have added a Datasource to the List, that works fine. I put a textbox within List B. That works. I want to get data so I use an expression. But I cant get data from the second datasource, only the first. Hope this is better.
Posted 19-Jan-11 21:21pm
Updated 19-Jan-11 21:48pm
Hiren Solanki 20-Jan-11 3:29am
It's not quite clear still please elucidate more.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

As far as I understood your question:
You need to have a list call list1 which will be having master column or master information. Within list1 you have another list call list2.
list2 will show up detail information of the master column which is in list1.

To do this I followed the following steps:
1. Added a list in report and droped the master field in it.
2. Added another list within list1 and droped the detail fields from datasource.
3. Now I needed to create a group in list1. So I right click on the list and selected the properties menu from it. From there a window poped up and I clicked on "Edit details group...". From the window I created an expression which was nothing but the master field name.
4. After that I ran the report and I got the master detail relation in two lists.

Hope this answer your question.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Not exactly. I don't data from the first datasource, I have a second datasource.

List1 uses Datasource A
List2 uses Datasource B

List2 lies within List1.

When I put a textbox in List2 and want to get data from Datasource B I can only get data from Datasource A since List2 lies within List1 (I think).

Thats a clear as I can type it :P

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 20 Jan 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100