我在 SSRS 中创建了一个报告,如果我想输入 2 个参数,它可以正常工作,但我想要的是为每个参数创建一个下拉列表。所以我创建了主数据集和两个额外的数据集,所以我的参数可以指向它们来创建列表,但是它不起作用,你能通过查看下面的数据集找出原因吗?
主要数据集
SELECT Racecourse.RacecourseID, Racecourse.Name AS Racecourse, Horses.Name AS Horse, RaceResults.Place AS Results, Jockeys.FirstName + ' ' + Jockeys.LastName As 'Jockey', Race.TimeofRace
FROM Race INNER JOIN
Racecourse ON Race.RacecourseID = Racecourse.RacecourseID INNER JOIN
RaceResults ON Race.RaceID = RaceResults.RaceID INNER JOIN
Horses ON RaceResults.RacehorseID = Horses.RacehorseID INNER JOIN
Jockeys ON RaceResults.JockeysID = Jockeys.JockeysID
WHERE @Racecourse = Racecourse.Name AND @TimeofRace = Race.TimeofRace
ORDER BY Place
赛马场数据集
SELECT
Racecourse.RacecourseID
,Racecourse.Name
FROM
Racecourse
WHERE @Racecourse = 'Racecourse.Name'
TimeofRace 数据集
SELECT
Race.RaceID
,Race.TimeofRace
FROM
Race
WHERE @TimeofRace = 'Race.TimeofRace'
提前致谢。
韦恩