开发者

How to link multiple tables in VS2010 RDLC Reports

开发者 https://www.devze.com 2023-01-19 04:25 出处:网络
I have two tables which are linking together by primary key... as an example Genre ----- GenreID GenreDe开发者_JAVA百科scription

I have two tables which are linking together by primary key... as an example

Genre
-----
GenreID
GenreDe开发者_JAVA百科scription

Track
-----
TrackID
GenreID
TrackName

I want to show like the following

TrackID Name    Genre
1          Track1   Pop
2          Track2   Pop
3          Track3   Rap
4          Track4   Rock

How can I write custom SQL statements and add the fields into the database? At the moment, I can only choose Table, View, SP and Func from the Database. Where should I write custom SQL statements and join the required tables?

Thanks.


You will need to create a new data table by joining the Track and Genre data sets on GenreID. Then add the new data set to your report and design off that.

You can easily create new data tables in designer by using your own SQL to join from existing tables.

0

精彩评论

暂无评论...
验证码 换一张
取 消