<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Davide Mauri : Reporting Services</title><link>http://sqlblog.com/blogs/davide_mauri/archive/tags/Reporting+Services/default.aspx</link><description>Tags: Reporting Services</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Reporting Services, MDX and the (unwanted) cascading parameters</title><link>http://sqlblog.com/blogs/davide_mauri/archive/2010/08/10/reporting-services-mdx-and-the-unwanted-cascading-parameters.aspx</link><pubDate>Tue, 10 Aug 2010 19:21:21 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:27749</guid><dc:creator>Davide Mauri</dc:creator><slash:comments>13</slash:comments><comments>http://sqlblog.com/blogs/davide_mauri/comments/27749.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/davide_mauri/commentrss.aspx?PostID=27749</wfw:commentRss><description>&lt;p&gt;Reporting Services can be used in conjunction with Analysis Services, creating powerful reporting solution that can satisfy almost&amp;#160; any customer needs for “standard” reporting. For “standard” I mean solutions that has not be created using Excel and a Cube to give the user complete freedom (and responsibility) over data.&lt;/p&gt;  &lt;p&gt;In one of our current project a customer has the need to allow all subsidiaries around Italy to access a report through their web-based extranet. As a consequence the report must be accessible via web and needs to be exported in Excel and PDF (plus several other constraints that are not interesting for the discussion so I’ll omit them). &lt;/p&gt;  &lt;p&gt;Reporting Services is surely the ideal solution for these requests. The data is stored in a Analysis Service 2008 Cube. Easy. The Report will have a little bit more that 10 parameters. Again, easy.&lt;/p&gt;  &lt;p&gt;Well…it &lt;em&gt;SHOULD&lt;/em&gt; be easy&lt;em&gt;. &lt;/em&gt;And it will be, at least ‘till the point where you start to struggle with MDX and parameters. It’s a common knowledge that Reporting Services can work quite well, though with several limitations, with Analysis Services: Report Parameters can take their value from an MDX query, and the values can be passed back to another MDX query in order to get the correct data for the report. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Unfortunately&lt;/strong&gt;, by default (tested on SQL Server 2008) all Report Parameters that uses MDX and support Single &amp;amp; Multi-Value selection, will act as a “cascading” parameters, which means when you run the report, all parameters except first will be disabled:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/image_128326F0.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" class="wlDisabledImage" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/davide_mauri/image_thumb_57BB7E19.png" width="642" height="155" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You have to select the value for the first parameter and than the report will load the value for the second. Then you select the value for the second and the third will get enabled…and so on.&lt;/p&gt;  &lt;p&gt;Of course, with several parameters this can be quite frustrating. This situation also make harder the development of a custom web page that has to purpose to make more user-friendly the selection of all the values when you have a high number of parameters.&lt;/p&gt;  &lt;p&gt;So, how to solve this problem? First, it’s imperative to understand why parameters become “cascaded”. If you have created the MDX query using the Query Editor, you also have specified what Dimension Attributes (or Hierarchies) has to be turned into parameters, simply flagging the related checkbox:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/clip_image0011_2F3C9C05.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="clip_image001[1]" border="0" alt="clip_image001[1]" src="http://sqlblog.com/blogs/davide_mauri/clip_image0011_thumb_7CA918C5.png" width="642" height="472" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Behind the scenes this will create hidden dataset used be the automatically created Report Parameters&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/image_5D564C25.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" class="wlDisabledImage" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/davide_mauri/image_thumb_4DD33A56.png" width="247" height="428" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;All the created dataset, with the exception of the one used by the first Report Parameter, have an explicit reference to others parameters. In particular the MDX slicer look like the following:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;WITH&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;[…]&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;SELECT&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;[…]&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;FROM      &lt;br /&gt;(       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; SELECT       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ( STRTOSET(@ProductProductCategories, CONSTRAINED) ) ON COLUMNS       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; FROM       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; (       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SELECT       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ( STRTOSET(@CustomerCustomerGeography, CONSTRAINED) ) ON COLUMNS       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; FROM       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Adventure Works]      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; )      &lt;br /&gt;)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This can lead to think that simply removing these references (which, in my experience, are not useful anyway), you can solve your problem. If you do so, just remember also to remove the associated Dataset Parameter. Anyway – and unfortunately – it’s&amp;#160; not so easy.&lt;/p&gt;  &lt;p&gt;In fact, the culprit of the problem is in the indentation of the parameter caption:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/image_68332D6D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" class="wlDisabledImage" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/davide_mauri/image_thumb_591C4E93.png" width="209" height="211" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The hierarchical look is generated by a calculated field in the parameter’s dataset:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/clip_image001_4A056FB9.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image001" border="0" alt="clip_image001" src="http://sqlblog.com/blogs/davide_mauri/clip_image001_thumb_6F8EED1A.png" width="640" height="295" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As one can guess, the field &lt;em&gt;ParameterCaptionIndented&lt;/em&gt; is the one that is used in the Parameter, to make it look like a hierarchy.&lt;/p&gt;  &lt;p&gt;The Expression of that field is very simple:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;=Space(3*Fields!ParameterLevel.Value) + Fields!ParameterCaption.Value&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;but this is enough to make the parameter “cascaded”.&lt;/p&gt;  &lt;p&gt;If you remove this, you won’t have any look-like hierarchy parameter, but you’ll also get rid of the “cascade” behavior in the Report Parameters.&lt;/p&gt;  &lt;p&gt;Now the we have solved the problem, we have to figure out how to have the hierarchy again, which is very comfortable from a user perspective. We can’t do it Reporting Services, so we have to move on Analysis Services. MDX doesn’t offer any kind of advanced string manipulation function, so we have to use .NET to create a MDX User Defined Function that can be called within our MDX Query so that the field &lt;em&gt;ParameterCaptionIndentation &lt;/em&gt;will be generated correctly directly by Analysis Services, without requiring us to create a Calculated Field anymore.&lt;/p&gt;  &lt;p&gt;Said and done:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;using System;     &lt;br /&gt;using Microsoft.AnalysisServices.AdomdServer;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;namespace SolidQ.AnalysisServices.Utils.Functions     &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public class StringHelper      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string IndentString(string source, int indentationLevel, int indentationSize)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; string indentation = new string(' ', indentationLevel * indentationSize);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return indentation + source;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string IndentString(string source, int indentationLevel)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return IndentString(source, indentationLevel, 4);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Very simple but very useful! After having compiled the code and loaded the generated Assembly into Analysis Services   &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/image_74FD5DBE.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" class="wlDisabledImage" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/davide_mauri/image_thumb_1AF30E15.png" width="254" height="143" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;the function can be used directly in the MDX query. The following code is the one used by Customer Geography Report Parameter:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;WITH      &lt;br /&gt;MEMBER [Measures].[ParameterCaption] AS       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; [Customer].[Customer Geography].CURRENTMEMBER.MEMBER_CAPTION       &lt;br /&gt;MEMBER [Measures].[ParameterCaptionIndented] AS       &lt;br /&gt;&amp;#160;&amp;#160; &lt;font style="background-color:#ffff00;"&gt; SolidQUtils.IndentString(       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Customer].[Customer Geography].CURRENTMEMBER.MEMBER_CAPTION,         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Customer].[Customer Geography].CURRENTMEMBER.LEVEL.ORDINAL,         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 3)        &lt;br /&gt;&lt;/font&gt;MEMBER [Measures].[ParameterValue] AS       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; [Customer].[Customer Geography].CURRENTMEMBER.UNIQUENAME       &lt;br /&gt;MEMBER [Measures].[ParameterLevel] AS       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; [Customer].[Customer Geography].CURRENTMEMBER.LEVEL.ORDINAL       &lt;br /&gt;SELECT       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Measures].[ParameterCaption],       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Measures].[ParameterCaptionIndented],      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Measures].[ParameterValue],       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Measures].[ParameterLevel]      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } ON COLUMNS,      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Customer].[Customer Geography].ALLMEMBERS ON ROWS       &lt;br /&gt;FROM       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; [Adventure Works]&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The highlighted section shows that the &lt;em&gt;ParameterCaptionIndeted&lt;/em&gt; member simply call the &lt;em&gt;IndentString&lt;/em&gt; function that takes 3 parameters:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;String to be indented&lt;/li&gt;    &lt;li&gt;Indent Level&lt;/li&gt;    &lt;li&gt;Indent Size (Optional. If omitted indentation size is 4 spaces)&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Using the same approach for all the Report Parameters, we can finally solve the “cascaded” problem!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/clip_image0013_44F30C3D.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="clip_image001[3]" border="0" alt="clip_image001[3]" src="http://sqlblog.com/blogs/davide_mauri/clip_image0013_thumb_589FF5D1.png" width="644" height="163" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;With many thanks from users and developers! &lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://sqlblog.com/blogs/davide_mauri/wlEmoticonsmile_70572D37.png" /&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=27749" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/MDX/default.aspx">MDX</category><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/SSAS/default.aspx">SSAS</category></item><item><title>PASS Summit 2010 – BI Workshop</title><link>http://sqlblog.com/blogs/davide_mauri/archive/2010/06/30/pass-summit-2010-bi-workshop.aspx</link><pubDate>Wed, 30 Jun 2010 12:01:10 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26596</guid><dc:creator>Davide Mauri</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/davide_mauri/comments/26596.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/davide_mauri/commentrss.aspx?PostID=26596</wfw:commentRss><description>&lt;p&gt;PASS Summit 2010 Pre &amp;amp; Post conference &lt;a href="http://sqlpass.eventpoint.com/PrePostConferenceSessions"&gt;are out&lt;/a&gt;! This year I’ll deliver the “&lt;a href="http://sqlpass.eventpoint.com/topic/details/TF1588"&gt;Creating BI Solution from A to Z&lt;/a&gt;” seminar in which, as the title implies, attendees will see how to create a BI solution starting from scratch. Going through the dimensional modeling and the creation of the Datawarehouse, the implementation of the ETL process with SSIS, the creation of cube with Analysis Services and reports with Reporting Services with, if time permits, also a glance at PowerPivot, attendees will get a solid ground on the whole process that drives the creation of a BI solution.&lt;/p&gt;  &lt;p&gt;The workshop will also show all the best practices and the best methodological approach matured in more than 5 years of working in the BI field.&lt;/p&gt;  &lt;p&gt;If you’ll be working on BI or you already have a created an initial BI solution and you want to be sure you’re following the right path, this is workshop is for you!&lt;/p&gt;  &lt;p&gt;Don’t miss it!&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=26596" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/Integration+Services/default.aspx">Integration Services</category><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/2008/default.aspx">2008</category><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/PASS/default.aspx">PASS</category><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/MDX/default.aspx">MDX</category><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/OLAP/default.aspx">OLAP</category><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/2008+R2/default.aspx">2008 R2</category><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/Best+Practices/default.aspx">Best Practices</category></item><item><title>Custom Aggregations Values in SQL Reporting Services with Tablix Filters</title><link>http://sqlblog.com/blogs/davide_mauri/archive/2009/07/24/custom-aggregations-values-in-sql-reporting-services-with-tablix-filters.aspx</link><pubDate>Fri, 24 Jul 2009 13:20:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:15465</guid><dc:creator>Davide Mauri</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/davide_mauri/comments/15465.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/davide_mauri/commentrss.aspx?PostID=15465</wfw:commentRss><description>&lt;p&gt;In these last days I’ve been working on a BI solution for a logistic company. One report I have to create has a particular behavior that can make life a little complex if you’re using Reporting Services: the value used in rows and column totals &lt;em&gt;is not calculated&lt;/em&gt; in any way, but is just taken from the database (SSAS in this case), just like any other cell value:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image001" border="0" alt="clip_image001" src="http://sqlblog.com/blogs/davide_mauri/clip_image001_4B953D69.png" width="381" height="123" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I’ve found this business case in a report that shows all the target values that a salesman has to reach. The total value for a month is not the average nor the sum of the target values for all the regions, but is just a fixed value set by someone (his manager, normally :-)) that represents that overall expected target for that month.&lt;/p&gt;  &lt;p&gt;The data returned from the database (no matter if using MDX or SQL; in this example I’m using T-SQL but in reality I’m using MDX) look like the following:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image001[8]" border="0" alt="clip_image001[8]" src="http://sqlblog.com/blogs/davide_mauri/clip_image0018_51DC13F7.png" width="349" height="389" /&gt;&lt;/p&gt;  &lt;p&gt;The &lt;em&gt;null &lt;/em&gt;values in the &lt;em&gt;region&lt;/em&gt; column represents the “total” value for that month, while for date (which is stored in a yyyymmdd integer format), as you may guess, the values for year are represented by the rows with value “0” in the month part.&lt;/p&gt;  &lt;p&gt;If you just use these values in a Tablix, using the &lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/clip_image00110_203526D1.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image001[10]" border="0" alt="clip_image001[10]" src="http://sqlblog.com/blogs/davide_mauri/clip_image00110_thumb_09FF0B7F.png" width="261" height="95" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;this is what you obtain:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/clip_image00112_36A7C558.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image001[12]" border="0" alt="clip_image001[12]" src="http://sqlblog.com/blogs/davide_mauri/clip_image00112_thumb_1BFB293F.png" width="518" height="158" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;clearly the column “20090000” and the no-name row are in the wrong place, since they should be shown as the last and the rightmost values, just like what normally happens with totals.&lt;/p&gt;  &lt;p&gt;How to do that? The anwser lies in the usage of &lt;em&gt;Adjacent Groups&lt;/em&gt; and &lt;em&gt;Group Filters&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;The first step is to remove that row and column from the data. This can be done specifying a filter for the existing groups.&lt;/p&gt;  &lt;p&gt;For the &lt;em&gt;reference_data&lt;/em&gt; group you just have to say that you want to filter out all the data related to the &lt;em&gt;20090000&lt;/em&gt; value:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/clip_image00114_6C5D0AB2.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image001[14]" border="0" alt="clip_image001[14]" src="http://sqlblog.com/blogs/davide_mauri/clip_image00114_thumb_23C31BE1.png" width="408" height="161" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For the &lt;em&gt;region&lt;/em&gt;, since we’re using a &lt;em&gt;null&lt;/em&gt; value, we have to use a little trick since the operator “&lt;em&gt;is” &lt;/em&gt;is not available.&lt;/p&gt;  &lt;p&gt;In the Filter &lt;em&gt;Expression&lt;/em&gt; field we have to specify something that will turn &lt;em&gt;null&lt;/em&gt; to &lt;em&gt;True &lt;/em&gt;or &lt;em&gt;False:&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;=(Fields!region.Value &lt;span class="kwrd"&gt;Is&lt;/span&gt; &lt;span class="kwrd"&gt;Nothing&lt;/span&gt;)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;then in the &lt;em&gt;Value&lt;/em&gt; field you just have to specify “True” (or False if you’re using the “=” operator):&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;=False&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Now, the matrix won’t display the “total” row and column. To show where we want we just have to add one Adjacted Group for columns and one for rows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/clip_image0011_422D5CCA.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image001[1]" border="0" alt="clip_image001[1]" src="http://sqlblog.com/blogs/davide_mauri/clip_image0011_thumb_0D40578D.png" width="464" height="206" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So that at the end the matrix will look like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/clip_image0013_2BAA9876.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image001[3]" border="0" alt="clip_image001[3]" src="http://sqlblog.com/blogs/davide_mauri/clip_image0013_thumb_2A65FF97.png" width="339" height="109" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now, if you run the report, the result will be the one we expect:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/davide_mauri/clip_image0015_5B190742.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image001[5]" border="0" alt="clip_image001[5]" src="http://sqlblog.com/blogs/davide_mauri/clip_image0015_thumb_406C6B29.png" width="515" height="136" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=15465" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/davide_mauri/archive/tags/Reporting+Services/default.aspx">Reporting Services</category></item></channel></rss>