简体   繁体   中英

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.

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. 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","")))

use this expression in Background color of row properties.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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