简体   繁体   English

自定义SSRS中Tablix的最后三行

[英]Customize the last three rows of a Tablix in SSRS

I have a table which is getting data from a query. 我有一个表正在从查询中获取数据。 Because I am not doing any calculation in SSRS, but instead in SQL and only pulling the data, I am having hard time figuring out how to customize the style for the last three rows. 因为我不在SSRS中进行任何计算,而是在SQL中进行任何计算,而只是提取数据,所以我很难确定如何为最后三行自定义样式。

Here is the design view: 这是设计视图:

在此处输入图片说明

Here is the preview: 这是预览:

在此处输入图片说明

Now as you can see the last three rows are either SUM or AVG of the above numbers. 现在,您可以看到最后三行是上述数字的SUM或AVG。 How can I make it so that the table displays a different background color for the bottom three rows? 如何使表格的底部三行显示不同的背景色?

您将需要为文本框格式的三行添加一个表达式,其内容类似于:

 =IIF(Fields![ARRIVED_DATE].Value="WEEKLY TOTAL","Grey",IIF(Fields![ARRIVED_DATE].Value="Prior Week","Red",IIF(Fields![ARRIVED_DATE].Value="12 WEEK AVERAGE","Green","Transparent")))

If i understand your point correctly this would be the solution 如果我正确理解您的观点,这将是解决方案

=iif(total number of records(int)=rownumber(nothing), "Color1",iif(total number of records(int)-1=rownumber(nothing),"Color2",iif(total number of records(int)-2=rownumber(nothing),"Color3",""))) = iif(记录总数(int)=行数(无),“ Color1”,iif(记录总数(int)-1 =行数(无),“ Color2”,iif(记录总数(int) -2 = ROWNUMBER(无), “COLOR3”, “”)))

use this expression in Background color of row properties. 在行属性的背景色中使用此表达式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM