我们也可以在矩阵报告中应用背景颜色,这里是链接可以参考
[SQL Server Reporting Services Tablix 和矩阵中的备用行背景颜色]
https://www.mssqltips.com/sqlservertip/3490/alternate-row-background-color-in-sql-server-reporting-services-tablix-and-matrix/
The above link is helpful to apply alternate background color to the records/fields
If we want to apply back ground color for specific records than specific records than
have to modify the below expression like:
这里的数字,如 964、5003 等,是基于可以应用的序列号/行号
特定记录的背景颜色
=Switch(VAL(ReportItems!ROWCOLOR.Value)=964, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=5003, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=5337, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=6241, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=8561, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=8673, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=13282, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=13775, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=1211, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=7361, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=7746, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=8556, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=10846, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=10994, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=13290, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=2243, "#D9D9D9",
VAL(ReportItems!ROWCOLOR.Value)=2607, "#D9D9D9"
)
我创建了一个组“Group1”并右键单击文本框并写表达式:RowNumber(nothing) 以生成序列号
我在一组中写了数字 1
在下图中,表达式的第一个字段包含 RowNumber(nothing)
https://i.stack.imgur.com/kGCue.png
https://i.stack.imgur.com/swlo4.png
https://i.stack.imgur.com/OpvAh.png
https://i.stack.imgur.com/stUn1.png
https://i.stack.imgur.com/8gaiG.png
https://i.stack.imgur.com/CJI9f.png
https://i.stack.imgur.com/d75Zd.png