reporting-services - 如果 ssrs 矩阵报告中的数据库中没有数据,则背景颜色不起作用
解决方案
我们也可以在矩阵报告中应用背景颜色,这里是链接可以参考
[SQL Server Reporting Services Tablix 和 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
推荐阅读
- javascript - 在 Handsontable 中有条件地设置嵌套行的样式
- c - 什么是分隔符?
- c# - purchase.products.get 忽略 productId 值并在 ProductPurchase 中返回 null
- java - 获取编译时错误推理变量 T 具有不兼容的界限
- reactjs - CSS 网格、Day.js、React:在我的基于网格的日历中,如何将具有特定日期的网格项推送到具有相应日期的网格图块中?
- javascript - React - 如何在单击按钮时在新窗口中打开组件?
- python-3.x - 求解器 Gurobi 和 OSQP QP 优化给出截然不同的结果
- firebase - 如何将firebase时间戳与graphql nest js一起使用?
- sonarqube - 是否可以定义具有多个标准的 Sonarqube 投资组合?
- scala - 如何从 List 内的 Map 中获取特定的键->值对