开发者

How to link multiple tables in VS2010 RDLC Reports

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜