How to change the color of the grid lines in the report

Abstract: how to change the color of the grid lines in the report


How the report color change cell lines
used 1.Table (data table)
      IIF (RowNumber () MOD 2, Color1, color2 for)
  
2.Matrix (matrix)
   matrix or table can not be used Rownumber ColumnNumber () like manner. With this way will produce the expected results. data color will bounce. So do a number of alternative techniques
   such as we want to do complex columns turns green
   in general we will Mod 2, "green", " White" with iif (RowNumber (Nothing) ). processing like this embodiment.

   the Step 1. needs to add the value of a group of columns in the column group. this group value. 1

   the Step 2. insert the column header and sets the calculation value
               = iif (! RunningValue (Fields Country.Value, CountDistinct , Nothing) Mod 2, "AliceBlue", "White")
           If there is more than one group must be set as follows:
               ! = IIF (RunningValue (Fields & Country.Value the CStr (Fields ! Year.Value), CountDistinct, Nothing) Mod 2, "AliceBlue", "White")

   the Step 3. set the background color in the column header in the column is inserted
              = the value
   
   the Step. 4.Background color data in a matrix table is set corresponding to the group row source field names. Value
            例如:
              =ReportItems!ColorNameTextbox.Value
   
   Step 5.将所有列表头部分设定相同颜色内容.
   
   Step 6.将产生出来的多的列字段设为最小值.
           
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.





Please Yong Yue Si powder to participate in Facebook MSBI group: http://www.facebook.com/#!/group.php?gid=303757165010

Original: Big Box  how to change the color of the grid lines in the report


Guess you like

Origin www.cnblogs.com/petewell/p/11516542.html