[英]SQL Server Report Builder - How to grey out a parameter with multiple sub-reports?
我有一個主要報告,其中包含三個子報告。 選擇某個報告時,我正在嘗試將參數選項之一顯示為灰色。 我想要這樣做的原因是因為其中一個子報表未使用此參數。 這是我現在使用的代碼。 顯示查詢結果的參數為@device。
--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。 任何想法???
您不能將參數變灰。 不幸的是,您也無法隱藏該參數,因為hidden屬性僅包含True
和False
。 您現在正在做什么可能是您可以做的最好的事情。 但是,您可以嘗試查看級聯參數 ,也許您可以為下拉列表提供稍微更用戶友好的值,例如“ None”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.