我有一个使用3个参数显示的报告。我希望在打开报告时自动填充值。
但它显示如下:
Dataset1:
SELECT DISTINCT
LectCode, LectName, AgeBand, RegYear, PRPH_ML1,
[Curriculum Area], PRPH_Title, Section, Section_Name,
Class_Register COLLATE DATABASE_DEFAULT + ' - ' + Register_Title
COLLATE DATABASE_DEFAULT + ' - ' + Register_Day
COLLATE DATABASE_DEFAULT + ' ' + CONVERT(char(5),
StartTime, 108) + ' - ' + CONVERT(char(5), EndTime, 108) AS Register,
CourseType, Mins_Poss, Mins_Att, Mins_Late, TermTimeWeekNo,
WeekStart, Class_Register,
Register_Title, Register_Day, StartTime, EndTime,
PrimaryProgramme, LectSection, LectDepartment
FROM CurrentAttendance_New
WHERE (RegYear = @Year) AND (CourseType IN (@CourseType))
AND (LectName IN (@Lecturer))
GROUP BY LectCode, LectName, AgeBand, RegYear, PRPH_ML1,
[Curriculum Area], PRPH_Title, Section, Section_Name,
CourseType, Mins_Poss, Mins_Att, Mins_Late,
TermTimeWeekNo, WeekStart, Class_Register, Register_Title,
Register_Day, StartTime, EndTime,
PrimaryProgramme, LectSection, LectDepartment
ORDER BY LectName, CourseType
Dataset2:
SELECT DISTINCT CourseType
FROM CurrentAttendance_New
Dataset3:
SELECT DISTINCT LectName
FROM CurrentAttendance_New
WHERE (CourseType IN (@CourseType))
我确保使用上述数据集中的值并设置默认值。
让我知道我哪里出错了。
答案 0 :(得分:1)
在WHERE
子句中,您是否拥有所有参数集?
WHERE @PLUMBING_VACANCY_3= "YES"
等
此外,如果应在加载时选择这些值,则应在参数属性下的默认值中更改它们,并将Parameters =设置为您的值。