Reporting Services Report Tablix altering color

IAltering color in Report Tablix is common task for reporting developer. It helpes user to be better oriented in output data.

I will demonstrate this functionality on report created in one of previous post. I chose report with grouping. I will implement altering colour per row on each of Tablix group region. Lets start with EnglishCountryRegionName group region. Select Textboxes, highlighted on picture bellow.

Go to Report Properties pane to Fill section. There is set static color as you see on the picture bellow.

Replace the static colour with following expression.

=IIF(RUNNINGValue(Fields!EnglishCountryRegionName.Value,CountDistinct,"DataSet1") MOD 2 = 1, "#9eb6e4", "White")

I try to explain the expression in more detail. We use function RunningValue which takes tree arguments. The first one is the field value, we use EnglishCountryRegionName value returnign name of each country region. The second one parameter is aggregate function. In our case it is count distinct, which will be calculated for each EnglichCountryRegionName field. The last one parameter sets scope for which the function is used. In our case we can put Nothing or “DataSet1” as the scope.


In design mode, there will not be visible any colour, Expression will be rendered when the report is running.

When running report, we can see that background colour changes for each EnglishCountryRegionName value.

Repeat the same for other groups to achieve similar report design on picture bellow.

 

SSAS – user does not have permission to create a new object

I deployed OLAP database to SSAS on customers servers many times. Few times I got stuck of that I was not able to create object trough XMLA script and I was so close, and I didn’t know that.

Of course, it depends on your permissions, but in my case, just run Management Studio like Administrator. What is the key to succeed

Sometimes the solution is so easy.

 

 

 

 

 

 

 

 

 

 

 

 

Splitting, merging cells in Tablix

To make your report Tablix looking better it could be very useful feature. As you can join Cells in excel you can join merge Textboxes in your Report Tablix.

  1. Select textboxes you would like to join
  2. Right click on your selection and Merge Cells in popup menu
Merge cells
Picture 1 Merge cells

Bellow you can see the result.

Sales report
Picture 2 Sales report

For the opposite action:

  1. Select merged Textboxes and select Split Cells from popup menu.
Split Cells
Picture 3 Split Cells