reporting-services - 如果字体是 SSRS 中最近 5 年的最小值或最大值,则突出显示字体
问题描述
我在 SSRS 中创建了一个矩阵来显示过去 5 年不同产品的订单数量。我想根据去年的总订单设置 products 字段的字体颜色。例如,如果去年的订单量是过去 5 年内记录的最高订单量,我希望字体为“绿色”。如果订单数量是过去 5 年中最低的,则为“红色”。如果订单数量既不是最低也不是最高则黑色。
我试过使用这个博客的例子。
我已经修改了表达式以包含我的案例的年份,但它不起作用。
有什么我想念的吗?
有人可以帮忙吗。
这是我为字体颜色尝试过的表达式。
=SWITCH((Fields!OrderQuantity.Value=ReportItems!MaxQty.Value) and (Fields!CalendarYear.Value="2007"),"Green",
(Fields!OrderQuantity.Value=ReportItems!MinQty.Value) and (Fields!CalendarYear.Value="2007"),"Red",
(((Fields!OrderQuantity.Value<ReportItems!MaxQty.Value) and (Fields!CalendarYear.Value="2007")) OR
(Fields!OrderQuantity.Value>ReportItems!MinQty.Value) and (Fields!CalendarYear.Value="2007")),"White")
我希望产品类别字体为“绿色”,因为 2007 年的订单量最高。但它不工作。
解决方案
推荐阅读
- angular - 角度 7 中的 require("http2")
- reactjs - React 如何让子组件拥有自己的状态
- c++ - 用 Qt::black 初始化 QColorDialog 总是返回黑色
- angular - Angular 获取 url 的最后一部分
- xml - Eclipse IDE 不填充示例 XML 文件中的元素和属性
- javascript - 使用 Javascript 计算 HTML 中的行数
- sql - 复杂的 SQL 请求
- azure-devops - 将用户添加到项目而不是组织的后果
- excel - 获取notepad++或microsoft excel中文本文件中所有空行的所有行号列表?
- javascript - 翻转卡虫 Safari