ReportingService中matrix设置alternating colors
来源:互联网 发布:maya软件培训 编辑:程序博客网 时间:2024/05/21 00:00
The RowNumber function in the Matrix is totally different with it in the table. So if we want to have the alternative color in the matrix, we may use the Running Function.
in the table,you can set the backgroundcolor property as =iif(RowNumber(Nothing) Mod 2,"gray","white").
in the matrix,you can follow this:
Green-Bar Matrix
Question:
How can I get a green-bar effect (alternating colors) in a matrix?
Answer:
For a green-bar table, you can simply use a background color expression like this: =iif(RowNumber(Nothing) Mod 2,"Green","White")
However, there is currently no GroupNumber() function on which to base a green-bar calculation in a matrix.
GroupNumber can be (mostly) simulated by using the RunningValue function to get a running distinct count of group expression values.
However, the trickiest part of green-bar in a matrix is the fact that some matrix cells may contain no data at all. This makes the group number calculation incorrect for empty cells.
To work around this, you need to effectively calculate the group number in the row header and then use that value inside the data cells.
Step 1: Add a (fake) inner row grouping
Select the innermost row grouping in your matrix. Right-click and select Insert Group.
For the group expression, group on a constant, such as =1
Step 2: Calculate the name of the color in the inner row grouping header
In the Value property of the newly created grouping header, add a calculation for the desired color based on a running value of a count distinct of the containing group expression.
For example: =iif(RunningValue(Fields!Country.Value,CountDistinct,Nothing) Mod 2, "AliceBlue", "White")
Note: If you have more than one row grouping, you may need to do the count distinct on the combination of all group expressions, like this:
=iif(RunningValue(Fields!Country.Value & CStr(Fields!Year.Value),CountDistinct,Nothing) Mod 2, "AliceBlue", "White")
Step 3: Set the background color of the inner row grouping header to =Value
Step 4: Set the background color of the matrix data cell to the value of the inner row grouping header
For example: =ReportItems!ColorNameTextbox.Value
Step 5: Set the background color of the outer row grouping header
You'll need to use the same expression here that you used for the Value of the inner row grouping header.
Step 6: "Cloak" the inner row grouping header (so it looks like part of of the outer grouping header)
Set the right border style of the outer grouping header to None.
Set the left border style of the inner grouping header to None.
Set the font weight of the inner grouping header to 1 pt.
Set the font color of the inner grouping header to =Value.
Set the CanGrow property of the inner grouping header to False.
Drag the inner grouping header to be as narrow as possible.
Optional: Hand-edit the RDL to set the width of the inner grouping header to 0in.
A full working sample of green-bar matrix is attached.
- ReportingService中matrix设置alternating colors
- ReportingService中matrix设置alternating colors
- Array(5) -- Sort Colors,Set Matrix Zeroes
- ReportingService实用工具
- ReportingService语法
- Android中常用colors.xml
- colors
- colors
- colors
- Colors
- Alternating Sums
- Alternating Current
- Alternating Current
- Alternating Current
- 使用Matrix设置字体
- Matrix相关设置
- matrix设置原始位置
- Matrix 设置位置
- 深入理解C语言指针的奥秘
- Flash Player 10 中的P2P
- 数据绑定表达式的引号
- Flash Player 10 的RTMFP
- RTMFP 百科
- ReportingService中matrix设置alternating colors
- Reporting Service 设置中文Bar
- 开源代码相关网站
- 讨论SOA注册与存储库之间存在的区别
- (网摘)XML应用例子
- 男人和女人的经典误会
- vb2005如何连接和操作数据库详解
- 2008教育部最新颁布词汇修改
- J2EE的13种核心技术简介