2016-03-15 77 views
0

我有一个报告显示在下面使用3个参数。我想在打开报告时看到自动填充的值。默认参数不按预期工作

但是,如下所示:

Parameter not showing default values

AvailableValues

DefaultValues

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)) 

我确信我使用从上面的数据集值和设定的默认值,以及。

让我知道我要去哪里错了。

+1

它看起来好像Lecturer的默认设置没有设置,或者设置不正确。你能提供更多关于你如何设置这个默认值的信息吗? –

+1

参数对话框的图片也有帮助。 –

回答

1

在你的WHERE子句中,你是否拥有所有参数集?

WHERE @PLUMBING_VACANCY_3= "YES"

此外,如果这些值应当在负载中选择,它们应在默认值下的参数属性改变和设定的参数=您的值(一个或多个)。