2016-03-15 81 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"

此外,如果這些值應當在負載中選擇,它們應在默認值下的參數屬性改變和設定的參數=您的值(一個或多個)。