我的查询看起来像这样:
Select FullName, ID, CASE WHEN TerritoryName IS NULL THEN 'Unknown' ELSE TerritoryName END AS Territory, SUM(Amount), Rank() OVER (ORDER BY SUM(Amount) DESC) AS Rank
From Contact
Where...
Group By ...
在SSRS中,我有一个名为Territory的下拉过滤器,它通过查询填充:
SELECT DISTINCT Name AS Territory
FROM Territory
ORDER BY Territory
问题是,当我在SSRS中添加Territory过滤器时,查询中标记为“Unknown”的结果会自动过滤掉而不会显示在报告上。 如何在报告中显示这些“未知数”?我是否需要以某种方式在下拉框中添加“未知”?
答案 0 :(得分:1)
您可以将下拉列表填充为:
SELECT Name AS Territory
FROM Territory
UNION
SELECT 'Unknown'
因此,未知是一个选项