0
我有一個主要的報告,有三個子報告。我正在嘗試在選擇某個報告時使某個參數選項變灰。我想這樣做的原因是因爲其中一個子報告不使用此參數。 下面是我現在使用的代碼。顯示查詢結果的參數是@device。SQL Server報表生成器 - 如何使多個子報表灰顯一個參數?
--When user select report 2, the parameter displays the device list from table2.
IF @selectReport = 2
BEGIN
SELECT DISTINCT type
FROM table2
END
--When user select report 3, the parameter displays the device list from table3.
IF @selectReport = 3
BEGIN
SELECT DISTINCT type
FROM table3
END
--When user select report 1. I want to grey out the parameter, but I could not do it.
--So I created the table contains NULL value.
--So, when the user select the report 1, the parameter will show only null value.
IF @selectReport = 1
BEGIN
SELECT DISTINCT type
FROM nullValueTable1
END
我希望它在選擇報告1而不是在下拉列表中顯示NULL時變灰。任何想法???