SSRS报告-Reporting Services RDLC

时间:2018-07-31 15:50:33

标签: visual-studio reporting-services ssrs-2008 rdlc

我正在尝试制作一个报告,在我的报告中仅放置3个指标,整列中的3个最高值。我已经尝试了几种解决方案,但仍然不了解。

This is the example, the left column is how I can do it, but I need only the 3 highest ones as I will show later

that's how I'd like to show it

如果有人可以告诉我该怎么做,我将不胜感激

谢谢。

1 个答案:

答案 0 :(得分:0)

您应该在基础查询中使用TOP和ORDER BY:

SELECT TOP 3
    [FirstValue],
    [SecondValue]
FROM [YourTable]
ORDER BY [FirstValue] ;

如果您无法更改查询,则可以尝试在SSRS中添加行号,然后隐藏行号> 3的任何行。请参阅此文章: how-to-get-total-of-top-10-sales-in-ssrs-2012