答案 0 :(得分:0)
可以使用下面的SQL查询和SSRS表达式来实现。
;WITH cte AS (
SELECT TOP (10) PERCENT MARKS,EmpName, 1 Ten FROM TableName ORDER BY MARKS
UNION ALL
SELECT TOP (10) PERCENT MARKS,EmpName, 2 Ten FROM TableName ORDER BY MARKS DESC
)
SELECT m.EmpName,
m.Marks,
CASE
WHEN cte.Ten = 1 THEN 'Green'
WHEN cte.Ten = 2 THEN 'Red'
ELSE ''
END RedGreen
FROM TableName m
LEFT JOIN cte
ON cte.Marks = m.Marks
一旦dataSet准备就绪,我们只需要为Fill Color设置表达式
如果您需要更多帮助,请与我们联系。