<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://prologika.com/CS/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/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"><channel><title>Prologika Forums</title><link>http://prologika.com/CS/blogs/</link><description>Business Intelligence to the Masses</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Maintaining State in Reporting Services 2008</title><link>http://prologika.com/CS/blogs/blog/archive/2009/06/30/maintaining-state-in-reporting-services-2008.aspx</link><pubDate>Tue, 30 Jun 2009 13:10:21 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3497</guid><dc:creator>tlachev</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Sometimes, more advanced reporting needs may require maintaining state using custom code. Recently I had to implement a rather involved report consisting of two sections: a detail section that used a recursive sum, Sum(Fields!SomeField.Value, , True), and a summary section with additional calculations which would reference some of the aggregated values in the detail section. Since Reporting Services is not Excel, you cannot reference arbitrary fields on a report. So, I had to cache the values from the detail section in a hashtable using custom code so the summary section could obtain these values when needed. The following embedded code gets the job done: 
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Friend Shared _hashtable As New System.Collections.Hashtable() &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Function GetKey(ByVal id as Long, ByVal column as String) as String &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;return Report.User!UserID &amp;amp; id &amp;amp; column &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;End Function
&lt;/span&gt;&lt;/p&gt;&lt;p&gt; 
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Function AddValue(ByVal id as Long, ByVal column as String, ByVal value As Object) As Object &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Dim key as String = GetKey(id, column) &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;If _hashtable.ContainsKey(key)=False Then &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;            _hashtable.Add(key, value) &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;End If &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Return value &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;End Function &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Function GetValue(ByVal id as Long, ByVal column as String) As Object &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Dim key as String = GetKey(id, column) &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;If _hashtable.ContainsKey(key) Then &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;    Return _hashtable(key) &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;End If &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Return Nothing &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;End Function &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Protected Overrides Sub OnInit() &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;        Dim keys As String() = New String(_hashtable.Keys.Count - 1) {}
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;        _hashtable.Keys.CopyTo(keys, 0)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;      
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;        For Each key as String In keys
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;         If key.StartsWith(Report.User!UserID) Then
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;         _hashtable.Remove(key)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;        End if
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;        Next key
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;End Sub &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;In my scenario, tablix cells in the detail section would call the AddValue function to cache the dataset field values. Then, cells in the summary section would call GetValue to obtain these cached values. This technique is not new and you&amp;#39;ve probably used it to solve similar challenges. 
&lt;/p&gt;&lt;p&gt;What&amp;#39;s new is that moving to Reporting Services 2008 you may need to revisit your custom code and make changes. First, in prior version of Reporting Services, you probably declared the hashtable variable as an instance variable and that worked just fine. However, Reporting Services 2008 introduced a new on-demand processing engine where each page is processed separately. Consequently, you may find that the report &amp;quot;loses&amp;quot; values. Specifically, if the report fits on one page, everything will work as expected. But if the report spills to more pages, the hashtable collection will lose the values loaded on the first page. The solution is to declare the hashtable object as a static (Shared in Visual Basic) object so it survives paging. 
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Friend Shared _hashtable As New System.Collections.Hashtable() &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;But because a static object is shared by all users running the report, you need to make the hashtable key user-specific, such as by using the User!UserID variable which returns the user identity. 
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Function GetKey(ByVal id as Long, ByVal column as String) as String &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;return &lt;strong&gt;Report.User!UserID&lt;/strong&gt; &amp;amp; id &amp;amp; column &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;End Function &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;Are we done? Well, there is a nasty gotcha that you need to be aware of. If the report takes parameters, you will surprised to find out that the custom code returns the cached values from the first report run and changing the parameters (report data) doesn&amp;#39;t change the values in these cells that call the GetValue function. To make the things even more confusing, testing the report in the BIDS Report Designer or Report Builder 2.0 will work just fine. But you will get the above issue after you deploy and run the server report, such as when you request the report in Report Manager or SharePoint. 
&lt;/p&gt;&lt;p&gt;What&amp;#39;s going on? As it turns out, the hashtable object survives report requests as a result of parameter changes. Consequently, the code that checks if the hashtable key exists will find the key when the report is reposted and it will not add the new value. 
&lt;/p&gt;&lt;p&gt; &lt;span style="font-family:Courier New;font-size:8pt;"&gt;If _hashtable.ContainsKey(key)=False Then &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;_hashtable.Add(key, value) &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;End If &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt; 
 &lt;/p&gt;&lt;p&gt;The solution is to clear the user-specific hashtable items each time the report is run. This takes place in the OnInit method. The OnInit method is a special method which gets executed before the report is processed. You can use this method to do initialization tasks or, in this case, clear state held in global variables. 
&lt;/p&gt;&lt;p&gt;Are we there yet? Almost. As the reader samsonfr pointed out in a  blog comment, we&amp;#39;ll need to make this code thread-safe because the chances are that multiple users may be running the report at the same time so concurrent threads may need to write and read to/from the static hashtable variable at the same time. As the Hashtable documentation explains &amp;quot;Hashtable is thread safe for use by multiple reader threads and a single writing thread. It is thread safe for multi-thread use when only one of the threads perform write (update) operations, which allows for lock-free reads provided that the writers are serialized to the Hashtable. To support multiple writers all operations on the Hashtable must be done through the wrapper returned by the Synchronized method, provided that there are no threads reading the Hashtable object. Enumerating through a collection is intrinsically not a thread safe procedure. Even when a collection is synchronized, other threads can still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.&amp;quot;
&lt;/p&gt;&lt;p&gt;Although the code adds and removes user-specific values only (the collection key uses User!UserID), Robert Bruckner from the SSRS dev team clarified
&lt;/p&gt;&lt;p&gt;&lt;span style="color:#c0504d;"&gt;&amp;quot;Everytime you have code like this in a multi-threaded environment, there is potential for a race-condition:
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#c0504d;"&gt;if (!_hashtable.ContainsKey(&amp;quot;abc&amp;quot;))     _hashtable.Add(...)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#c0504d;"&gt;In this case you have to take a lock to ensure ContainsKey and Add are run as an atomic piece of code.&amp;quot;&lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;Keeping this in mind, my proposal for making the code thread-safe code follows (concurrent experts, please comment if you find anything substantially wrong with my attempt to make a hashtable access thread-safe). 
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Friend Shared _hashtable As New System.Collections.Hashtable()
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;&lt;strong&gt;Dim _sht as System.Collections.Hashtable = System.Collections.Hashtable.Synchronized(_hashtable)
&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Function GetKey(ByVal id as Long, ByVal column as String) as String
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;     return Report.User!UserID &amp;amp; id &amp;amp; column
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;End Function 
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Function AddValue(ByVal id as Long, ByVal column as String, ByVal value As Object) As Object
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;   If id = -1 or id = -2 or id=-3 Then
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;       Dim key as String = GetKey(id, column)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;       If _sht.ContainsKey(key)=False Then
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;    _sht.Add(key, value)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;       End If
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;   End If
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt; Return value
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;End Function
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Function GetValue(ByVal id as Long, ByVal column as String) As Object
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;    Dim key as String = GetKey(id, column) 
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;    If _sht.ContainsKey(key) Then
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;    Return _sht(key)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;    End If
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;   Return Nothing
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;End Function
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;Protected Overrides Sub OnInit() 
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;&lt;strong&gt;       SyncLock _hashtable.SyncRoot
&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;        Dim keys As String() = New String(_hashtable.Keys.Count - 1) {}
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;        _hashtable.Keys.CopyTo(keys, 0)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;      
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;       For Each key as String In keys
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;     If key.StartsWith(Report.User!UserID) Then
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;         _hashtable.Remove(key)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;    End if
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;      Next key
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;&lt;strong&gt;      End SyncLock
&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:8pt;"&gt;End Sub&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3497" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>Suppressing Auto-generation of MDX Parameter Datasets</title><link>http://prologika.com/CS/blogs/blog/archive/2009/06/08/suppressing-auto-generation-of-mdx-parameter-datasets.aspx</link><pubDate>Mon, 08 Jun 2009 22:13:49 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3463</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;There is an unfortunate issue with the MDX Query Designer in SSRS 2008 Report Designer and Report Builder 2.0 where changing the main dataset overwrites the parameter datasets.  This is a rather annoying issue because often you need to make manual changes to the parameter datasets. However, when you make a change to the main dataset, the MDX Query Designer wipes out the manual changes and auto-generates the parameter databases from scratch. According to the &lt;a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=417209"&gt;feedback&lt;/a&gt; I got from Microsoft, the issue will be fixed in SQL Server 2008 R2. 
&lt;/p&gt;&lt;p&gt;Meanwhile, there is a simple workaround which requires manually changing the dataset definition in RDL. Basically, you need to add a SuppressAutoUpdate designer switch to the &lt;strong&gt;parameter&lt;/strong&gt; dataset, as follows:
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Query&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DataSourceName&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;Viking&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DataSourceName&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;CommandText&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt; …
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;&lt;strong&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;rd:SuppressAutoUpdate&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;rd:SuppressAutoUpdate&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;&lt;span style="color:blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;rd:Hidden&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;rd:Hidden&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;&lt;span style="color:blue;"&gt; &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Query&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3463" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Analysis+Services/default.aspx">Analysis Services</category></item><item><title>TechEd 2009 North America BIN304 Slides and Code Uploaded</title><link>http://prologika.com/CS/blogs/blog/archive/2009/05/22/teched-2009-north-america-bin304-slides-and-code-uploaded.aspx</link><pubDate>Fri, 22 May 2009 18:22:41 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3424</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;ve &lt;a href="http://prologika.com/CS/media/p/3423.aspx"&gt;uploaded&lt;/a&gt; the slides and code from my Reporting Services 2008 Tips, Tricks, Now and Beyond breakout presentation delivered on May 13th 2009 at TechEd 2009 North America.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3424" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Events/default.aspx">Events</category></item><item><title>TechEd 2009 BI Power Hour Demos</title><link>http://prologika.com/CS/blogs/blog/archive/2009/05/21/teched-2009-bi-power-hour-demos.aspx</link><pubDate>Thu, 21 May 2009 12:50:25 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3419</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The TechEd 2009 BI Power Hour demos, which I &lt;a href="http://prologika.com/CS/blogs/blog/archive/2009/05/14/transmissions-from-teched-usa-2009-day-3.aspx"&gt;blogged&lt;/a&gt; about before, are &lt;a href="http://blogs.msdn.com/bi/archive/2009/05/20/microsoft-bi-power-hour-demos.aspx"&gt;posted&lt;/a&gt; on the Microsoft BI Blog. Robert Bruckner has also &lt;a href="http://blogs.msdn.com/robertbruckner/archive/2009/05/20/multi-player-gaming-in-rs-aka-bi-power-hour-2008.aspx"&gt;posted&lt;/a&gt; the SSRS demo from the TechED USA 2008 Power Hour, which he renamed to Sea Battle. 
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3419" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Events/default.aspx">Events</category></item><item><title>Transmissions from TechEd USA 2009 (Day 4)</title><link>http://prologika.com/CS/blogs/blog/archive/2009/05/15/transmissions-from-teched-usa-2009-day-4.aspx</link><pubDate>Fri, 15 May 2009 05:08:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3397</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I got the final evaluation results from my session. Out of some 15 Business Intelligence sessions, mine was the fourth most attended session with 169 people attending. Based on 35 evaluations submitted, it was ranked as the third most useful session with an average satisfaction score of 3.46 on the scale from 1 to 4. For someone who does presentations occasionally, I&amp;#39;m personally happy with the results. Thanks for all who attended and liked the session! &lt;/p&gt;
&lt;p&gt;I took it easy today. I attended the Scott Ruble&amp;#39;s Microsoft Office Excel 2007 Charting and Advanced Visualizations session in the morning. This was purely Excel-based session with no BI included. It demonstrated different ways to present information effectively in Excel, such as with conditional formatting, bar charts, sparklines, etc. Next, I was in the Learning Center until lunch. &lt;/p&gt;
&lt;p&gt;In the afternoon, I decided to do some sightseeing and take a tour since I&amp;#39;ve never been to LA. I saw Marina Del Ray, Santa Monica, Venice Beach, Beverly Hills, Sunset Strip, Hollywood (and the famous sign of course), Mann&amp;#39;s Chinese Theatre, and Farmer&amp;#39;s Market. Coming from Atlanta and knowing the Atlanta traffic, I have to admit that the LA traffic is no better. In Atlanta, the traffic is bad during peak hours. In LA, it seems it&amp;#39;s bad all the time. Movies and premieres make the situation even worse. There was a huge movie premiere at 7 PM in the Chinese Theater with celebrities arriving with limos. This jammed the entire area. There were at least two movies being shot in different parts of the cities. But the rest of tour was fun. LA is one of the few cities in the world where almost every building has a famous story behind it. &lt;/p&gt;
&lt;p&gt;This concludes my TechEd USA 2009 chronicles. Tomorrow, I&amp;#39;ll have time only for a breakfast and packing my luggage. I&amp;#39;m catching an early flight as it would take me four hours to fly to Atlanta. With three hours time difference, I&amp;#39;ll be hopefully in Atlanta by 9 PM and at home by midnight.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3397" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/General/default.aspx">General</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Events/default.aspx">Events</category></item><item><title>Transmissions from TechEd USA 2009 (Day 3)</title><link>http://prologika.com/CS/blogs/blog/archive/2009/05/14/transmissions-from-teched-usa-2009-day-3.aspx</link><pubDate>Thu, 14 May 2009 04:51:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3391</guid><dc:creator>tlachev</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Today was a long day. I started by attending the Richard Tkachuk&amp;#39;s A First Look at Large-Scale Data Warehousing in Microsoft SQL Server Code Name &amp;quot;Madison&amp;quot;. Those of you familiar with Analysis Services would probably recognize the presenter&amp;#39;s name since Richard came from the Analysis Services team and maintains the &lt;a href="http://www.sqlservernanalysisservices.com"&gt;www.sqlservernanalysisservices.com&lt;/a&gt; website. He recently moved to the Madison team. Madison is a new product and it&amp;#39;s based on a product by DATAllegro which Microsoft acquired sometime ago. As the session name suggests, it&amp;#39;s all about large scale databases, such as those exceeding 1 terabyte of data. Now, this is enormous amount of data that not many companies will ever amass. I&amp;#39;ve been fortunate (or unfortunate) that I never had to deal with such data volumes. If you do, then you may want to take a look at Madison. It&amp;#39;s designed to maximize sequential querying of data by employing a shared-nothing architecture where each processor core is given dedicated resources, such as a table partition. A controller node orchestrates the query execution. For example, if a query spans several tables, the controller node parses the query to understand where the data is located. Then, it forwards the query to each computing node that handles the required resources. The computing nodes are clustered in a SQL Server 2008 fail-over cluster which runs on Windows Server 2008. The tool provides a management dashboard where the administrator can see the utilization of each computing node. &lt;/p&gt;
&lt;p&gt;Next, I attended the Fifth Annual Power Hour session. As its name suggests, TechEd has been carrying out this session for the past five years. The session format was originally introduced by Bill Baker who&amp;#39;s not longer with Microsoft. If you ever attended one of these sessions, you know the format. Product managers from all BI teams (Ofice, SharePoint, PerformancePoint, and SQL Server) show bizarre demos and throw t-shirt and toys to everything that moves (OK, sits). The Office team showed an Excel Services demo where an Excel spreadsheet ranked popular comics characters. Not to be outdone, the PerformancePoint team showed a pixel-based image on Mona Lisa. Not sure what PerformancePoint capabilities this demonstrated since I don&amp;#39;t know PerformancePoint that well but it looked great. &lt;/p&gt;
&lt;p&gt;The Reporting Services team showed a cool demo where the WinForms ReportViewer control would render a clickable map (the map control will debut in SQL Server 2008 R2) that re-assigns the number of Microsoft sales employees around the US states. For me, the coolest part of this demo was that there was no visible refresh when the map image is clicked although there was probably round tripping between the control and the server. Thierry D&amp;#39;Hers later on clued me in that there is some kind of buffering going on which I have to learn more about. This map control looks cool! Once I get my hands on it with some tweaking maybe I&amp;#39;ll be able to configure it as a heat map that is not geospatial. &lt;/p&gt;
&lt;p&gt;Finally, Donald Farmer showed another Gemini demo which helped learn more about Gemini. I realized that 20 mil+ rows were compressed to 200 MB Excel file. However, the level of compression really depends on the data loaded in Excel. Specifically, it depends on the redundant values in each column. I learned that the in-memory model that is constructed in Excel is implemented as in-process DLL whose code was derived from the Analysis Services code base. The speed of the in-memory model is phenomenal! 20 mil rows sorted within a second on the Donald&amp;#39;s notebook (not even laptop, mind you).&amp;nbsp;At this point Microsoft hasn&amp;#39;t decided yet how Gemini will be licensed and priced. &lt;/p&gt;
&lt;p&gt;As usual, after lunch I decided to hang around in the BI learning center and help with questions. Then, it was a show time for my presentation! I don&amp;#39;t why but every TechEd I get one of these rooms that I feel intimidated just to look at them. How come Microsoft presenters who demo cooler stuff than mine, such as features in the next version, get smaller rooms and I get those monstrous rooms? It must be intentional; I have to ask the TechEd organizers. The room I got was next to the keynote hall and could easily accommodate 500-600 people, if not more. Two years ago, I actually had a record of 500+ people attending my session which was scheduled right after the keynote. &lt;/p&gt;
&lt;p&gt;This year, the attendance was more modest. I don&amp;#39;t have the final count yet, but I think about 150+ folks attended my session so there was plenty of room to scale up. I think the presentation well very well. The preliminary evaluation reports confirm this. I demoed report authoring, management, and delivery tips sprinkled with real-life examples. We had some good time and I think everyone enjoyed the show. &lt;/p&gt;
&lt;p&gt;It&amp;#39;s always good to know that your work is done. I look forward to enjoying the rest of TechED and LA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3391" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/General/default.aspx">General</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Events/default.aspx">Events</category></item><item><title>Transmissions from TechEd USA 2009 (Day 2)</title><link>http://prologika.com/CS/blogs/blog/archive/2009/05/13/transmissions-from-teched-usa-2009-day-2.aspx</link><pubDate>Wed, 13 May 2009 05:31:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3385</guid><dc:creator>tlachev</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;I started the day by attending the Donald Farmer and Daniel Yu&amp;#39;s session &amp;quot;Creating the Right Cubes for Microsoft Excel and Excel Services&amp;quot; hoping that I&amp;#39;ll get a sneak preview of Excel 2010. Alas, it was all about refining the cube definition with display folders, perspectives, hierarchies, etc. so it appears more user-friendly in Excel. Later, I learned that Office 2010 (or whatever it will be called) is under strict NDA which explains the lack of demos. The most interesting thing about that session was that I finally understood why the SSAS team decided to scale down the cube wizard in SSAS 2008 to generate basic dimensions only. The reason was performance. You see, the BIDS 2005 cube wizard would oftentimes suggest non-optimal dimension hierarchies and the modeler wouldn&amp;#39;t revise the design leading to bad performance. &lt;/p&gt;
&lt;p&gt;Next, I attended the Thierry D&amp;#39;Hers Top Ten Reasons for Using Microsoft SQL Server 2008 Reporting Services. It&amp;#39;s always good to watch RS-related sessions. Thierry listed the community support as one of the reasons for organizations to consider moving to SSRS. I agree with this and the great community support is applicable to all MS technologies. Speaking about BI only, a few years ago there wasn&amp;#39;t a single book about Cognos for example. Granted, the last I look on Amazon there was one book. In comparison, Microsoft has a vibrant community of book authors, MVPs, trainers, etc. Almost every publisher has a book about SSRS 2008. This is of course good for the community and so good about authors as the competition is tough &lt;span style="font-family:Wingdings;"&gt;J&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;Thierry listed the Report Builder 2.0 as #1 reason to move to SSRS 2008, followed by data visualization, and tablix. Based on my real-life projects, I&amp;#39;d personally have listed them in the reverse order, with tablix being #1. This session officially announced that the map control will make to the Kilimanjaro release (now officially called SQL Server 2008 R2). Later on, Thierry was kind enough to show me a demo of the map pre-release bits. One of the data modes is using the SQL Server 2008 geospatial data types which would let you map any region in the world. Thierry showed a cool report showing the worldwide sales of SQL Server, where each country had a different color gradient based on the sales volume. &lt;/p&gt;
&lt;p&gt;After lunch, I hang around the BI area in the learning center to answer questions and rub shoulders with Microsoft employees and peers. I was surprised to learn that there are only two Reporting Services-related sessions for the entire TechEd and one of them is mine! All of a sudden, I felt 2&amp;quot; taller. Later on, I felt adventurous to learn something completely new and attended a SQL Server 2008 Failover Clustering only to realize how much I don&amp;#39;t know about it since I&amp;#39;ve never used it. BTW, there are great advancements in the SQL Server 2008 failover clustering, such as ability to upgrade or patch a cluster node without stopping it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3385" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/General/default.aspx">General</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Events/default.aspx">Events</category></item><item><title>Transmissions from TechEd USA 2009 (Day 1)</title><link>http://prologika.com/CS/blogs/blog/archive/2009/05/11/transmissions-for-teched-usa-2009-day-1.aspx</link><pubDate>Tue, 12 May 2009 03:33:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3379</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Day 1 of TechEd 2009 is almost over with the exception of the Community Influencers Party tonight. I heard that this year they expect 7,000 attendees. This is a huge scale-down from previous years. For instance, we had 16,000 attendees at TechEd USA 2007. Economy is hitting everything hard. &lt;/p&gt;
&lt;p&gt;I thought the keynote was kind of lame. Judging by it, Microsoft has only three products: Windows 7 (officially announced to ship around holidays although Microsoft didn&amp;#39;t say which holidays), Windows Server 2008 (the buzz is now the forthcoming R2 release), and Exchange Server 2010. Unlike previous TechEds, there wasn&amp;#39;t a single announcement about other products. SQL Server KJ, Office 2010, Azure, dev tools? Nope, apparently not worth mentioning. Sure Mark Russinovich, whom I respect very much, did some cool Windows 7 demos but there were not enough to pique my interest. I understand that OS and Exchange Server are bedrock for every business and after the sad Vista saga, we have to show the world that now we&amp;#39;ll do things right with Windows 7, but the BI soul in me was thirsty for more. &lt;/p&gt;
&lt;p&gt;After lunch, I hang around the BI area of the Learning Center, where I answered questions and met with other peers, including Nick Barclay (MVP) whom I wanted to meet personally for a while. Then, I attended the excellent Donald Farmer and Kamal Hathi &amp;#39;s Microsoft Project Code Name &amp;quot;Gemini: Self Service Analysis and the Future of BI and I had the chance to see the Gemini, which I &lt;a href="http://prologika.com/CS/blogs/blog/archive/2008/10/06/memory-dimensional-model-mdm-on-the-horizon.aspx"&gt;blogged&lt;/a&gt; briefly about before without knowing too much, for the first time in action and gain more in-depth knowledge. &lt;/p&gt;
&lt;p&gt;The Gemini is an end-user oriented Excel add-in that will let the user acquire data from a variety of data sources, including SSRS reports (SSRS KJ will expose reports as data feeds) and SharePoint lists, and load them in an Excel spreadsheet. The tool crunches data very fast even on a modest computer (the demo showed a notebook computer working with millions of rows) thanks to its ability to compress column-level data. This works because a dataset column would typically contain redundant data. &lt;/p&gt;
&lt;p&gt;Once data is loaded in Excel, the tool will attempt to automatically determine the relationships between datasets (loaded in separate spreadsheets) to create a hidden dimensional model consisting of fact and dimension in-memory tables. The user will be able to manually specify the dataset relationships by telling the tool which column will be used to join the datasets (very much like joining relational tables). Moreover, the user will be able to define calculated columns using Excel-style formulas. Finally, as the add-in builds behind the scenes an in-memory cube, the user will be able to slice and dice data in a Pivot table report. So, no Analysis Services is needed if all the user wants is manipulating data on the desktop. &lt;/p&gt;
&lt;p&gt;Where things are getting more interesting is deploying the models on the server. To do so, the end user would deploy the Excel spreadsheet to the MOSS Report Library. Note that MOSS is required for server-side deployment. When other users request the spreadsheet, an Analysis Services redirector will understand that this is a Gemini model and service the requests from a server cube. At this point is not clear how exactly the server cube will be built and whether it could be managed in SSMS. Once the cube returns data, Excel Services will kick in to return data in HTML. A Reporting Services client can also connect to the server cube by its URL. This is no different than connection to a regular cube as Reporting Services will launch the familiar MDX query designer. &lt;/p&gt;
&lt;p&gt;So, where is the IT in the new Gemini world? IT will use a cool MOSS dashboard to understand who&amp;#39;s deployed what model and how the models are used, such as when the datasets were refreshed, what are the most popular models, what resources these models took on the server, etc. &lt;/p&gt;
&lt;p&gt;What&amp;#39;s my personal take on Gemini? It&amp;#39;s not up to me to decide how useful it is since it&amp;#39;s a business-oriented tool, such as Report Builder 2.0. Business users will have the final word. Based on my personal experience though, the data analytics problems that I need to solve with traditional Analysis Services cubes surpass the Gemini capabilities by far. So, don&amp;#39;t throw your MDX knowledge out of the door yet. In my line of work, I can see Gemini being useful as a cube prototyping tool, especially in the early stages of requirement gathering where data can be typed in Excel and I can demonstrate to users what a cube can do for them. Of course, Microsoft plans for Gemini are much more ambitious than that. In the ideal world, all business users would upgrade to Office 2010 and create cool Gemini models to give IT folks a long-deserved break ;-). Or, so the fairytale goes&amp;hellip;. &lt;/p&gt;
&lt;p&gt;To wrap up the day, I attended What&amp;#39;s New in Microsoft SQL Data Services presentation by Rick Negrin to find out that SQL Data Services is nothing more than SQL Server running on Microsoft data centers. SQL Data Services will support two application connectivity modes: a &amp;quot;code near&amp;quot; mode where the application (typically a web application) is deployed to Azure and &amp;quot;code far&amp;quot;, where the application will connect to SQL Server over Internet using the TDS protocol. Microsoft role is to provide scalability and failover. Not all SQL Server features will be available in version 1. For example, CLR will not make the cut. &lt;/p&gt;
&lt;p&gt;A long and tiring day. I am off to the party now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3379" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/General/default.aspx">General</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Events/default.aspx">Events</category></item><item><title>SQL Server 2008 Business Intelligence Development and Maintenance Toolkit Available</title><link>http://prologika.com/CS/blogs/blog/archive/2009/04/15/sql-server-2008-business-intelligence-development-and-maintenance-toolkit-available.aspx</link><pubDate>Thu, 16 Apr 2009 01:46:58 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3342</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Today was supposed to be the birthday of the &lt;a href="http://www.microsoft.com/learning/en/us/books/13112.aspx"&gt;SQL Server 2008 Business Intelligence Development and Maintenance Toolkit&lt;/a&gt; by Microsoft Press but it&amp;#39;s not available with retailers, such as &lt;a href="http://www.amazon.com/MCTS-Self-Paced-Training-Exam-70-448/dp/0735626367/ref=pd_bbs_sr_4?ie=UTF8&amp;amp;s=books&amp;amp;qid=1239844770&amp;amp;sr=8-4"&gt;Amazon&lt;/a&gt;, yet. I guess a couple or so more days as the book is finding its way to resellers. 
&lt;/p&gt;&lt;p&gt;As with the 2005 version, I was privileged to work together with Erik Veerman and Dejan Sarka (all SQL Server MVPs) on the new revision.  My part was the four Analysis Services chapters. Besides updating the book for SQL Server 2008, we re-worked the entire material to flow more logically and make this resource even more useful to help you prepare for the corresponding 70-448 exam.
&lt;/p&gt;&lt;p&gt;I hope you&amp;#39;ll find the toolkit useful and pass the exam to certify!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3342" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category></item><item><title>Overwriting Parameter Defaults</title><link>http://prologika.com/CS/blogs/blog/archive/2009/04/13/overwriting-parameter-defaults.aspx</link><pubDate>Tue, 14 Apr 2009 01:02:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3335</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;: An interesting question &lt;a target="_blank" href="http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/83d0c624-09a2-44c0-82ba-c2eb48571323"&gt;popped&lt;/a&gt; today on the discussion list about overwriting the default of a cascading parameter. In this particular case, the report has two parameters: Frequency and HireDate. The HireDate parameter is dependent on the Frequency parameter. Specifically, when the user changes the Frequency parameter, custom code changes the default of the HireDate parameter. Sounds easy, right? Well, not so fast. &lt;/p&gt;
&lt;p&gt;This requirement calls for smashing the HireDate default. However, smashing values that the user selected (either explicitly or implicitly by not changing the default) is usually considered to be a bad thing. There exist uncommon cases such as this one where the author of the report can reasonably know the user would expect their previously selected value will be overridden. Unfortunately, Reporting Services doesn&amp;#39;t not currently have a feature which would allow the report author to distinguish the common case from the uncommon case. As a result, the current design handles the common case. (Note: In SQL 2000, SSRS defaulted to smashing the user&amp;#39;s selection with the default when an upstream parameter value changed. And, this resulted in a large volume of customer complaints. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: So, what&amp;#39;s the solution? One option you may want to explore, which the sample report demonstrates (&lt;a target="_blank" href="http://prologika.com/CS/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/blog/parameter_5F00_default.zip"&gt;attached&lt;/a&gt;), if the Valid Values list changes (as a result of the upstream parameter value changing) and it no longer contains the user&amp;#39;s selection, SSRS is forced to re-evaluate the default. Careful use of the Valid Values list can in many cases simulate the desired behavior of always overriding the user&amp;#39;s selection back to the default. This is I set the HireDate available values to the same expression, so its available value always changes.&lt;/p&gt;
&lt;p&gt;(Please visit the site to view this media)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3335" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Reporting+Services/default.aspx">Reporting Services</category></item><item><title>Microsoft SQL Server 2008 Reporting Services Add-in for Microsoft SharePoint Technologies, April 2009</title><link>http://prologika.com/CS/blogs/blog/archive/2009/04/13/microsoft-sql-server-2008-reporting-services-add-in-for-microsoft-sharepoint-technologies-april-2009.aspx</link><pubDate>Mon, 13 Apr 2009 15:24:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3333</guid><dc:creator>tlachev</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;As I &lt;a href="http://prologika.com/CS/blogs/blog/archive/2009/02/25/report-builder-2-0-clickonce.aspx"&gt;mentioned&lt;/a&gt; in a previous blog, one very important SSRS enhancement in the recently released &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=66ab3dbb-bf3e-4f46-9559-ccc6a4f9dc19&amp;amp;displaylang=en"&gt;SQL Server 2008 SP1&lt;/a&gt; is Report Builder 2.0 ClickOnce. This lets you reconfigure the native and SharePoint integration modes to let the user use Report Builder 2.0 instead of Report Builder 1.0. &lt;/p&gt;
&lt;p&gt;Note that in SharePoint integration mode, installing SP1 only is not enough. That&amp;#39;s because there are actually two instances of RB2.0 ClickOnce. If you install SQL Server 2008 SP1, this will provide an update for native mode &lt;strong&gt;only&lt;/strong&gt;. For SharePoint integration mode, you must refresh the Microsoft SQL Server 2008 Reporting Services Add-in for Microsoft SharePoint Technologies. This is necessary because the ClickOnce bits must reside on the SharePoint server. The April 2009 version of the add-in can be downloaded from &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=58edd0e4-255b-4361-bd1e-e530d5aab78f&amp;amp;displaylang=en"&gt;here&lt;/a&gt;. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3333" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>SSAS Import Wizard to the Rescue</title><link>http://prologika.com/CS/blogs/blog/archive/2009/04/02/ssas-import-wizard-to-the-rescue.aspx</link><pubDate>Thu, 02 Apr 2009 17:32:37 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3315</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Sometimes, it&amp;#39;s better just to reset. I came across an &lt;a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=417499"&gt;issue&lt;/a&gt; concerning processing a partition whose containing measure group joins a dimension via another reference dimension.  Specifically, when I attempt to process the partition, the server would error out with:
&lt;/p&gt;&lt;p&gt;&lt;span style="color:red;"&gt;The binding for the &amp;#39;dimension key&amp;#39; column is not a ColumnBinding type
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;What made this issue interesting is that I was able to repro the issue each time I would process the partition but the Microsoft support engineer, who was assigned to this issue, hasn&amp;#39;t been able to. After some digging we realized that the issue only happens in project mode, that is, when working with the project source in BIDS and deploying to the server. 
&lt;/p&gt;&lt;p&gt;How do we fix this horrible issue? We reverse-engineer the deployed cube using the SSAS Import Wizard to regenerate the source code. 
&lt;/p&gt;&lt;ol&gt;&lt;li&gt;In BIDS, click File-&amp;gt;New-&amp;gt;Project.
&lt;/li&gt;&lt;li&gt;In the New Project dialog, select Import Analysis Services 2008 (or 2005 depending on the version you have) Database.
&lt;/li&gt;&lt;li&gt;Specify the location of the deployed database. BIDS will reverse-engineer the database to its source code.
&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Magically, after this procedure the error went away although we are still working on finding out what caused the error with the original code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3315" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Analysis+Services/default.aspx">Analysis Services</category></item><item><title>Excel PivotTable Tabular Reports</title><link>http://prologika.com/CS/blogs/blog/archive/2009/03/31/excel-pivottable-tabular-reports.aspx</link><pubDate>Tue, 31 Mar 2009 21:12:08 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3306</guid><dc:creator>tlachev</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Here is a great tip thanks to Greg Galloway who pointed me to the Steve Novoselac&amp;#39;s  excellent &lt;a href="http://blog.stevienova.com/2009/02/01/microsoft-bi-client-tools-easing-the-transition-from-excel-2003-to-excel-2007-pivottable-layout-and-design/"&gt;blog&lt;/a&gt;. By default, Excel 2007 PivotTable stacks (hierachizes) the attributes on the report even if they are from the same  dimension. For example, let&amp;#39;s say the user wants to slice by the product hierarchy but want also some additional product attributes, such as the product color, size, etc. By default, Excel will produce the following layout:
&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.prologika.com/blog/033109_2111_ExcelPivotT1.png" alt="" /&gt;
	&lt;/p&gt;&lt;p&gt;Needless to say, this is hardly what the users want to see as they would prefer the product attributes to be displayed in a tabular format.  Luckily, this is easy albeit not very intuitive.  
&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Before&lt;/strong&gt; you drop the first field on PivotTable, click the Design main menu on the ribbon (the one next to Options menu). 
&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;img src="http://www.prologika.com/blog/033109_2111_ExcelPivotT2.png" alt="" /&gt;
	&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Expand the Report Layout drop-down menu and select Show in Tabular Form. Again, make sure that that PivotTable is empty before you do this.
&lt;/li&gt;&lt;li&gt;If you want to remove subtotals, expand the Subtotals drop-down menu and select Do Not Show Subtotals.
&lt;/li&gt;&lt;li&gt;Finally, to remove the +/- indicators, right-click on PviotTable and select PivotTable Options. On the Display tab, uncheck the Show Expand/Collapse Buttons.
&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Then, you can proceed to laying out the report as usual. Now you have a cool-looking tabular report.
&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.prologika.com/blog/033109_2111_ExcelPivotT3.png" alt="" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3306" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Analysis+Services/default.aspx">Analysis Services</category></item><item><title>Report Builder – Past, Now and Future</title><link>http://prologika.com/CS/blogs/blog/archive/2009/03/31/report-builder-past-now-and-future.aspx</link><pubDate>Tue, 31 Mar 2009 13:21:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3303</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The Report Builder technology made its debut in SQL Server 2005. It targeted business users who wanted to author their own (ad-hoc) reports but they were not necessarily technically savvy, meaning that no technical knowledge about database schemas or query syntax was assumed. The Report Builder technology includes a Report Builder Model and Report Builder Client. Similar to other ad-hoc reporting tools, such as Impromptu, the solution developer was required to implement a Report Builder model that is layered on top of the database and deploy it to the server. This model would receive the reports authored by the end users, which were described in an abstract language (SMDL), and automatically translate them to native queries for the supported data sources (SQL Server, Oracle, and Analysis Services).The initial vision, which didn&amp;#39;t materialize, was to make the query generator open, so developers can plug in custom query generators for other data sources. The Report Builder Client is a ClickOnce desktop report designer which was capable of producing very simple template-based reports. &lt;/p&gt;
&lt;p&gt;As Brian Welcker, a former Group Program Manager on the SSRS team, explained in his &lt;a href="http://blogs.msdn.com/bwelcker/archive/2007/12/11/transmissions-from-the-satellite-heart-what-s-up-with-report-builder.aspx"&gt;blog&lt;/a&gt;, the Report Builder technology itself enjoyed good acceptance but it wasn&amp;#39;t perfect. To start with, many business users found the Report Builder Client too limiting. Targeting Analysis Services as a data source was problematic to say the least as essentially you had to &amp;quot;wrap&amp;quot; the cube with the Report Builder model layer while a direct access to the cube was preferred. As a result, SQL Server 2008 brought in &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=9f783224-9871-4eea-b1d5-f3140a253db6&amp;amp;displaylang=en"&gt;Report Builder 2.0&lt;/a&gt; which was targeted to supersede the Report Builder Client. As I &lt;a href="http://prologika.com/CS/blogs/blog/archive/2008/08/25/report-builder-2-0-rc1-is-here.aspx"&gt;explained&lt;/a&gt;, besides its name Report Builder 2.0 has very little to do with its predecessor as it&amp;#39;s much closer to the BIDS Report Designer than Report Builder 1.0. It provides a full RDL support and shares the same design layout with the BIDS Report Designer but runs outside Visual Studio as a desktop application (&lt;a href="http://prologika.com/CS/blogs/blog/archive/2009/02/25/report-builder-2-0-clickonce.aspx"&gt;ClickOnce-enabled&lt;/a&gt; in SQL Server 2008 Service Pack 1). &lt;/p&gt;
&lt;p&gt;So, does this mean that the Report Builder technology itself is outdated moving to SQL Server 2008? Absolutely not. If you are looking for an ad-hoc solution that targets small to medium-size SQL Server and Oracle databases, you should definitely evaluate Report Builder. In fact, future releases are expected to bring exciting changes to the Report Builder model which I cannot discuss as they are under NDA. On the report authoring side, business users should evaluate both Report Builder 1.0 (still available in SQL Server 2008) and Report Builder 2.0. Based on my experience, even non-technical users, such as these who struggle with copy and paste, would prefer Report Builder 2.0, so I&amp;#39;d definitely encourage my users to switch to it. &lt;/p&gt;
&lt;p&gt;That said, remember that Report Builder is not the only ad-hoc technology that Microsoft provides. As many of you know, I am a big fun of Analysis Services for OLAP and ad-hoc reporting. If you are willing to invest time to learn Analysis Services and MDX (and you should), another approach is to implement a cube instead of a proprietary Report Builder model. If the user needs traditional (banded) reports, they can use the Report Builder 2.0 MDX Query Designer to author such reports from the cube. Of course, one of the advantages of this approach is that Analysis Services enjoys broader client support so you are not limited to Report Builder 2.0 only as a reporting tool. For example, business users can use Excel, ProClarity, and third-party tools. So, choosing a Report Builder model or SSAS is an important decision that requires carefully evaluating your reporting requirements, implementation effort, and skill set. &lt;/p&gt;
&lt;p&gt;What may not be so obvious is that if you decide to use a Report Builder model, you can have the best of both worlds: Report Builder model on the server that abstract the database and Report Builder 2.0 client that supports all report authoring features. Unlike the BIDS Report Designer, with Report Builder 2.0 the user doesn&amp;#39;t have to (in fact the user can&amp;#39;t) create a data source that points to the model. Instead, the user wold point to a server Report Builder model when defining the report data source: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In the Report Data pane, click New &amp;ndash;&amp;gt; Data Source. Notice that the Data Source Properties dialog says &amp;quot;Use a shared connection or report model&amp;quot;. &lt;/li&gt;
&lt;li&gt;Browse to the Report Builder model on the server and click OK. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once in the query designer, notice that it shows the same Report Builder metadata as in Report Builder 1.0. You have the same entity navigation that guides the user to the entities that are related to the selected entity. From here, authoring a report is a matter of dragging and dropping entities and fields. One thing that is not working in Report Builder 2.0 though, which is likely to be fixed in a future release, is filter prompts. Report Builder Client 1.0 would automatically populate the parameter available values if you select a filter as a prompt. Report Builder 2.0 would generate a report parameter but you have manually set up a dataset for the available values and bind it to the parameter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3303" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Reporting+Services/default.aspx">Reporting Services</category></item><item><title>Troubleshooting the SharePoint Add-in for Reporting Services Part 2</title><link>http://prologika.com/CS/blogs/blog/archive/2009/03/30/troubleshooting-the-sharepoint-add-in-for-reporting-services-part-2.aspx</link><pubDate>Mon, 30 Mar 2009 21:03:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3301</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Today, a co-worker declared a victory after struggling a few days to get Reporting Services 2008 SharePoint integration mode going on Windows Server 2008 (aka Longhorn). I helped of course &lt;span style="font-family:Wingdings;"&gt;J&lt;/span&gt; &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It all started with access denied error when attempting to deploy reports to SharePoint. Navigating to the WSS Central Admin Operations page would reveal however that the Reporting Services section is missing. After n-installs of the RS add-in we realized that something is not right. &lt;br /&gt;&lt;strong&gt;Take-home note&lt;/strong&gt;: If the Reporting Services section is missing, the Reporting Services add-in failed to install irrespective of the fact that it didn&amp;#39;t report any errors. Bummer No 1.&lt;br /&gt;Wish No 1: The RS add-in should report errors to users ideally with recommendations.&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;I asked him to troubleshoot the RS add-in installation following the steps in this &lt;a href="http://prologika.com/CS/blogs/blog/archive/2008/11/19/troubleshooting-the-sharepoint-add-in-for-reporting-services.aspx"&gt;blog&lt;/a&gt;. &lt;/div&gt;
&lt;p&gt;The most important line from the add-in log file was: &lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="color:#1f497d;"&gt;**********&amp;nbsp; User does not have permissions to add feature to site collection ******** &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left:36pt;"&gt;So, the add-in installed the Report Server Integration Feature but it couldn&amp;#39;t activate it although my co-worker used the same account (his Windows account) to install the add-in and he had WSS Farms Administrators rights? Bummer No 2. Welcome to the SharePoint candy land where things are not what they appear to be. &lt;br /&gt;Wish No 2: The farm administrator should have the right permissions to activate features or if he doesn&amp;#39;t have them for whatever reasons, the add-in should report this beforehand.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Activate the feature manually: &lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Go to SharePoint 3.0 Central Administration. &lt;/li&gt;
&lt;li&gt;Select Site Actions -&amp;gt; Site Settings &lt;/li&gt;
&lt;li&gt;Under the Site Collection Administration section click Site Collection Features &lt;/li&gt;
&lt;li&gt;Activate the Report Server Integration Feature in the list &lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Run the RS add-in again. This time, no error messages in the add-in log file. &lt;/div&gt;
&lt;p&gt;Success! &lt;/p&gt;
&lt;p&gt;Disclaimer: The issues described above might be Windows Server 2008-specific (we have a tighter security model now, right) or at least I don&amp;#39;t recall having them on Windows Server 2003. &lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3301" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Measures on Rows</title><link>http://prologika.com/CS/blogs/blog/archive/2009/03/13/measures-on-rows.aspx</link><pubDate>Sat, 14 Mar 2009 01:26:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3268</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;: You want an MDX query that returns measures on rows and calculated members on columns. You get &lt;em&gt;The Measures hierarchy already appears in the Axis0 axis &lt;/em&gt;error. That&amp;#39;s because calculated members added to measures are treated as measures and you cannot have the same dimension (Measures in this case) on different axes. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Let&amp;#39;s point out that the above-mentioned error doesn&amp;#39;t occur if you request dimensions on columns. For example, the following is a perfectly&amp;nbsp;legit query: &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;&lt;span style="color:#0000ff;"&gt;select&lt;/span&gt; {[Date].[Calendar].[Calendar Year].&amp;amp;[2002], &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;[Date].[Calendar].[Calendar Year].&amp;amp;[2003]} &lt;span style="color:#0000ff;"&gt;on&lt;/span&gt; 0, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;{[Measures].[Internet Sales Amount], &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;[Measures].[Reseller Sales Amount], &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;[Measures].[Sales Amount] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;} &lt;span style="color:#0000ff;"&gt;on&lt;/span&gt; 1 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;&lt;span style="color:#0000ff;"&gt;from&lt;/span&gt; [Adventure Works] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.prologika.com/blog/031409_0126_MeasuresonR1.png" alt="" /&gt; &lt;/p&gt;
&lt;p&gt;In addition, you may be able to use the capabilities of the tool to rotate dimensions from columns to rows, such as using a crosstab report layout in Reporting Services. Interestingly, PivotTable in Excel 2007 lets you add measures on rows although behind the scenes Excel requests measures on columns but does an internal rotation to move the measure columns on rows. &lt;/p&gt;
&lt;p&gt;However, sometimes you may need asymmetric columns that filter the results. This may force you to use calculated members on columns and measures on rows. Since you cannot put the calculated members on Measures, consider adding them to a dimension. The following query adds Column1 and Column2 calculated members to the Product.Category attribute. Notice that the first column filters the bikes sales for USA only. &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;&lt;span style="color:#0000ff;"&gt;with&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;member&lt;/span&gt; [Product].[Category].Column1 &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; ([Product].[Category].[Bikes], [Date].[Calendar].[Calendar Year].&amp;amp;[2002], [Geography].[Country].&amp;amp;[United States]) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;&lt;span style="color:#0000ff;"&gt;member&lt;/span&gt; [Product].[Category].Column2 &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; ([Product].[Category].[Bikes], [Date].[Calendar].[Calendar Year].&amp;amp;[2003]) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;&lt;span style="color:#0000ff;"&gt;select&lt;/span&gt; {[Product].[Category].Column1, [Product].[Category].Column2 } &lt;span style="color:#0000ff;"&gt;on&lt;/span&gt; 0, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;{[Measures].[Internet Sales Amount], &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;[Measures].[Reseller Sales Amount], &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;[Measures].[Sales Amount] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;} &lt;span style="color:#0000ff;"&gt;on&lt;/span&gt; 1 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;font-family:Courier New;"&gt;&lt;span style="color:#0000ff;"&gt;from&lt;/span&gt; [Adventure Works] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Of course, you can use any tuple or aggregation function for the member definition. BTW, you can cheat SSRS to bypass the rule that insists that measures must be on columns and the entire validation and preparation goodness by manually entering the query in the report definition and defining the dataset fields and mappings.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.prologika.com/blog/031409_0126_MeasuresonR2.png" alt="" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3268" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Analysis+Services/default.aspx">Analysis Services</category></item><item><title>Invisible Cubes</title><link>http://prologika.com/CS/blogs/blog/archive/2009/03/07/invisible-cubes.aspx</link><pubDate>Sat, 07 Mar 2009 15:54:37 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3260</guid><dc:creator>tlachev</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;I had a head-scratcher the other day. All of a sudden, SQL Server Management Studio stopped showing the cubes in the dropdown of the MDX Query tab although MDX queries and reports would execute just fine. The Reporting Services MDX Query Designer would complain with &amp;quot;No cubes found&amp;quot; error when I attempted to launch it from the dataset properties. This strange behavior coincided with installing &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6f26fc45-f0ca-49cf-a6ee-840c7e8bb8af&amp;amp;displaylang=en"&gt;SQL Server 2008 SP1 CTP&lt;/a&gt;, so I was quick to find a culprit. My suspicion was that the SSAS Windows authentication was failing was some reason although the SQL Server Profiler would show that the right Windows identity was connecting to the database.
&lt;/p&gt;&lt;p&gt;To troubleshoot this further, I issued the following schema rowset query when connected to the SSAS database in SSMS:
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;&lt;span style="color:blue;"&gt;select&lt;/span&gt; * &lt;span style="color:blue;"&gt;from&lt;/span&gt; $system.mdschema_cubes
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Interestingly, the query would return a list of the database dimensions (SSAS treats dimensions as cubes and prefix the dimension name with $) but it wouldn&amp;#39;t return the cube name itself. Then, I had a Eureka moment. I went to the Cube Structure tab in the BIDS Cube Designer, and I realized that that somehow I managed to set the cube Visible property to False. Not sure why you would ever want to make the cube invisible and why this property is there to start with but there it was. Flipping it back to True and redeploying the cube fixed the mysterious No Cubes Found error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3260" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Analysis+Services/default.aspx">Analysis Services</category></item><item><title>Speaking at TechEd 2009 USA</title><link>http://prologika.com/CS/blogs/blog/archive/2009/03/01/speaking-at-teched-2009-usa.aspx</link><pubDate>Mon, 02 Mar 2009 03:24:51 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3252</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;One of my TechEd 2009 session proposals got approved. The session is tentatively named &lt;strong&gt;Reporting Services 2008 Tips and Tricks, How-to, and Beyond&lt;/strong&gt;. I am planning to cover solutions to common questions and challenges that span the three phases of the reporting lifecycle: authoring, management and delivery. I hope you can attend my session If you planning to attend TechEd 2009 USA. Shoot me a note if you want me to cover something in particular. See you in LA!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3252" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Events/default.aspx">Events</category></item><item><title>Hacking MDX Query Designer Parameters</title><link>http://prologika.com/CS/blogs/blog/archive/2009/02/25/hacking-mdx-query-designer-parameters.aspx</link><pubDate>Thu, 26 Feb 2009 02:25:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3241</guid><dc:creator>tlachev</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;(Please visit the site to view this media)Continuing our intrepid journey in the land of SSRS-SSAS integration, after we&amp;#39;ve &lt;a href="http://prologika.com/CS/blogs/blog/archive/2009/02/13/retrieving-cube-metadata-in-reports.aspx"&gt;figured out&lt;/a&gt; how to retrieve the cube metadata, we are ready to tackle another unchartered territory: query parameters. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;: You need to parameterize the MDX query by a measure or a simple parameter. Take for example the following report (&lt;a href="http://prologika.com/CS/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/blog/simpleparameters.zip"&gt;attached&lt;/a&gt;). &lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.prologika.com/blog/022609_0224_HackingMDXQ1.png" alt="" /&gt; &lt;/p&gt;
&lt;p&gt;This report shows the Internet Sales Amount measure broken down by the Employees parent-child hierarchy. What&amp;#39;s more interesting is the Show Descendants parameter. It lets you filter the report for a single employee (Show Descendants = False) or the descendants of the selected employee including the selected employee (Show Descendants = True). So, what&amp;#39;s the issue? You can whip out such a report in no time if you source data from a relational database. However, the MDX Query Designer insists that the parameter is resolved to a single dimension member or a set of dimension members. Apparently, simple parameters or parameterizing by measures were considered uncommon scenarios. So, we need a sleek hack. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Luckily, there is a way to gain more control over the MDX query parameters but the design mode (the one that lets you drag and drop stuff) won&amp;#39;t cut it. So, it may make sense to author the report query in design mode as much as you can before you jump into the cold waters of MDX query mode because there is no going back to drag and drop, sorry. &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;To start with, you need to define a query parameter for the ShowDescendants parameter. Switch to MDX mode and click the Query Parameters toolbar button (enabled only in MDX mode). &lt;/li&gt;
&lt;li&gt;Add a new ShowDescendants &amp;quot;hanging&amp;quot; parameter that doesn&amp;#39;t reference any dimension. Make sure that the query parameter name matches the report parameter name. Otherwise, the MDX Query Designer will treat the parameter as a new parameter and it won&amp;#39;t associate it to the existing ShowDescendants report parameter.&amp;nbsp;Note that the parameter name is case-sensitive. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src="http://www.prologika.com/blog/022609_0224_HackingMDXQ2.png" alt="" /&gt; &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Leave the Dimension and Hierarchy columns empty. Luckily, they are not required in MDX mode. Either type in a measure name, such as [Measures].[Sales Summary], or enter DEFAULT in the Default column. In the latter case, the default cube measure will be used when you test the query in the MDX Query Designer. See this &lt;a href="http://cwebbbi.spaces.live.com/Blog/cns!7B84B0F2C239489A!4123.entry"&gt;blog&lt;/a&gt; by Chris Webb for ideas about how to speed up the default measure if needed. Click OK. &lt;/li&gt;
&lt;li&gt;Back to the query, change it as follows: &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-size:8pt;font-family:Courier New;"&gt;SELECT NON EMPTY { [Measures].[Reseller Tax Amount] } ON COLUMNS, NON EMPTY &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:8pt;font-family:Courier New;"&gt;&lt;strong&gt;IIF(@ShowDescendants=False, StrToMember(@EmployeeEmployees)&lt;/strong&gt;, &lt;strong&gt;DESCENDANTS(StrToMember(@EmployeeEmployees)))&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:8pt;font-family:Courier New;"&gt;DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME, PARENT_UNIQUE_NAME, LEVEL_NUMBER ON ROWS FROM [Adventure Works] CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;These changes are specific to the report requirements. In our case, the IIF expression checks the value of the ShowDescendants parameter. If the user has selected the False option, the query brings only the selected employee on rows. Otherwise, we use the Descendants function to bring the descendants of the selected employee. &lt;/p&gt;
&lt;p&gt;Looks hacky? Join me and make a wish on connect.microsoft.com to improve the SSRS-SSAS integration. Don&amp;#39;t be surprised if you are not active that the MDX Query Designer will continue to sneak from one version to another unchanged.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3241" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Analysis+Services/default.aspx">Analysis Services</category></item><item><title>Report Builder 2.0 ClickOnce</title><link>http://prologika.com/CS/blogs/blog/archive/2009/02/25/report-builder-2-0-clickonce.aspx</link><pubDate>Wed, 25 Feb 2009 19:38:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3236</guid><dc:creator>tlachev</dc:creator><slash:comments>8</slash:comments><description>&lt;p&gt;One important change that Service Pack 1 for SQL Server 2008 (public CTP available &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=6f26fc45-f0ca-49cf-a6ee-840c7e8bb8af&amp;amp;displaylang=en&amp;amp;tm"&gt;here&lt;/a&gt;) will bring is ClickOnce deployment of Report Builder 2.0. By default, however, Report Manager or SharePoint (if you have SSRS installed in SharePoint integration mode) still point to Report Builder 1.0. Here is how to reconfigure SSRS to launch Report Builder 2.0 instead. The following procedure assumes SharePoint integration mode but the steps are similar if SSRS is running in native mode. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CAUTION&amp;nbsp;&amp;nbsp;&amp;nbsp;Steps 1 and 2 below to copy folders are&amp;nbsp;for the CTP bits of SQL Server 2008 SP1 only because the CTP build doesn&amp;#39;t support RB 2.0 ClickOnce in&amp;nbsp;SharePoint integration mode. SQL Server 2008 SP1 RTM will include an installer to make the appropriate folder changes automatically. Therefore, DO NOT&amp;nbsp;manually copy the folder content&amp;nbsp;with the final bits&amp;nbsp;or undo your changes before you install&amp;nbsp;SP1 RTM so the installer doesn&amp;#39;t fail.&lt;/strong&gt; &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="text-decoration:line-through;"&gt;Back up the content of the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\ReportBuilder folder. This step is not needed with native mode.&lt;/span&gt; &lt;/li&gt;
&lt;li&gt;&lt;span style="text-decoration:line-through;"&gt;Copy all files from the C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\ReportBuilder folder to the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\ReportBuilder folder. This step is not needed with native mode.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;If you install SQL Server 2008 SP1 this will provide an update for native mode &lt;strong&gt;only&lt;/strong&gt;.&amp;nbsp; In order to get Report Builder ClickOnce for SharePoint integration mode working, you need to download the RB 2.0 ClickOnce update for the RS SharePoint add-in from the feature pack page.&amp;nbsp; This is necessary because the ClickOnce bits must reside on the SharePoint server.&amp;nbsp;As of the time of this writing, the latest add-in is April 2009 which you can download from &lt;a target="_blank" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=58edd0e4-255b-4361-bd1e-e530d5aab78f&amp;amp;displaylang=en"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Open WSS Central Administration. Click the Application Management tab. Click the Set Server Defaults link found under the Reporting Services section. In native mode, open Report Manager and click the Site Settings top menu. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img width="700" src="http://www.prologika.com/blog/022509_0300_rbclickonce20.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;5. Enter the URL address to the ReportBuilder_2._0_0_0.application file. In SharePoint mode, assuming you followed steps 1-2, the URL address will be:&lt;br /&gt;&lt;strong&gt;/_vti_bin/ReportBuilder/ReportBuilder_2_0_0_0.application&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In native mode, it will be: &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/ReportBuilder/ReportBuilder_2_0_0_0.application &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;At this point, SSRS is reconfigured to launch Report Builder 2.0 instead of Report Builder 1.0. From the end user perspective, the user would launch RB 2.0 just like they used to launch RB1.0, that is, click New-&amp;gt;Report Builder Report in SharePoint or click the Report Builder button in Report Manager. The first time the user does this, the Report Builder 2.0 bits (almost 50 MB) will get downloaded and installed in the ClickOnce local application cache, which is a hidden directory under Local Settings for the current user. The ClickOnce application cache will not be cleared when the user clears the browser cache. Subsequent requests will use the local copy. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt; Now that &lt;a target="_blank" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=66ab3dbb-bf3e-4f46-9559-ccc6a4f9dc19&amp;amp;displaylang=en"&gt;SQL Server 2008 SP1&lt;/a&gt; is released, it includes a &lt;a target="_blank" href="http://download.microsoft.com/download/7/0/1/701890C9-2990-4AB2-A41B-21F7152A3082/Readme_rsclickonceaddin.htm"&gt;readme&lt;/a&gt; file with steps how to configure and troubleshoot Report Builder 2.0 ClickOnce in SharePoint integration mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3236" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>Reporting Services Tracer</title><link>http://prologika.com/CS/blogs/blog/archive/2009/02/23/reporting-services-tracer.aspx</link><pubDate>Tue, 24 Feb 2009 02:35:40 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3233</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;To make a humble contribution to open source, I&amp;#39;ve just &lt;a href="http://www.codeplex.com/rstracer"&gt;uploaded&lt;/a&gt; the Reporting Services Tracer (RsTracer) project to CodePlex.  RsTracer helps you trace the URL and SOAP traffic to/from a report server. Given the sheer number of Web methods supported by Reporting Services, you might find yourself asking which web method should you choose for the management task at hand and how should you call it? At the same time, it is likely that Report Manager or Management Studio already supports some aspect of the management feature you want to implement. 
&lt;/p&gt;&lt;p&gt;Wouldn&amp;#39;t it be nice to be able to peek under the hood and see what APIs Report Manager or a custom application calls? This is exactly what the RsTracer sample was designed to handle. RsTracer intercepts the server calls and outputs them to a trace listener, such as the &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx"&gt;Microsoft DebugView for Windows&lt;/a&gt;. RsTracer helps you see the APIs that a Reporting Services client invokes and what arguments it passes to each interface. It also intercepts the server response. Armed with this information, you can easily reproduce the same feature in your custom management application. You can use RsTracer with SSRS 2000, 2005, and 2008.
&lt;/p&gt;&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3233" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Reporting+Services/default.aspx">Reporting Services</category></item><item><title>Retrieving Cube Metadata in Reports</title><link>http://prologika.com/CS/blogs/blog/archive/2009/02/13/retrieving-cube-metadata-in-reports.aspx</link><pubDate>Fri, 13 Feb 2009 21:24:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3199</guid><dc:creator>tlachev</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;An interesting question &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/bfa2bc7d-534c-49cb-bc8f-28b08986ca5c/"&gt;popped&lt;/a&gt; up on the discussion list the other day about how to retrieve a list of the cube measures so the report author can display them in a report parameter. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution 1:&lt;/strong&gt; If you just need a list of measures but not the measure metadata, such as display folder, etc., you can use the following (not trivial, ok hacky) query, which I &lt;a href="http://cwebbbi.spaces.live.com/blog/cns!7B84B0F2C239489A!412.entry"&gt;borrowed&lt;/a&gt; from my esteemed colleague MVP and MDX guru Chris Webb: &lt;/p&gt;
&lt;p style="background:white;margin-left:36pt;"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;span style="color:#0000ff;"&gt;WITH&lt;/span&gt;&lt;span style="color:#080808;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;SET&lt;/span&gt;&lt;span style="color:#080808;"&gt; MYSET &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:7pt;color:#080808;"&gt; &lt;/span&gt;&lt;span style="font-size:10pt;"&gt;&lt;span style="color:#800000;"&gt;HEAD&lt;/span&gt;&lt;span style="color:#080808;"&gt;([Date].[Date].[Date].&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;MEMBERS&lt;/span&gt;&lt;span style="color:#080808;"&gt;, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;COUNT&lt;/span&gt;&lt;span style="color:#080808;"&gt;(MEASURES.&lt;/span&gt;&lt;span style="color:#800000;"&gt;ALLMEMBERS&lt;/span&gt;&lt;span style="color:#080808;"&gt;)-1) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background:white;margin-left:36pt;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span style="color:#0000ff;"&gt;MEMBER&lt;/span&gt;&lt;span style="color:#080808;"&gt; MEASURES.MeasureUniqueName &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="color:#080808;"&gt;&amp;nbsp; MEASURES.&lt;/span&gt;&lt;span style="color:#800000;"&gt;ALLMEMBERS&lt;/span&gt;&lt;span style="color:#080808;"&gt;.&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ITEM&lt;/span&gt;&lt;span style="color:#080808;"&gt;(&lt;/span&gt;&lt;span style="color:#800000;"&gt;RANK&lt;/span&gt;&lt;span style="color:#080808;"&gt;([Date].[Date].&lt;/span&gt;&lt;span style="color:#800000;"&gt;CURRENTMEMBER&lt;/span&gt;&lt;span style="color:#080808;"&gt;, MYSET)-1).&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;UNIQUENAME &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background:white;margin-left:36pt;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span style="color:#0000ff;"&gt;MEMBER&lt;/span&gt;&lt;span style="color:#080808;"&gt; MEASURES.MeasureDisplayName &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="color:#080808;"&gt; MEASURES.&lt;/span&gt;&lt;span style="color:#800000;"&gt;ALLMEMBERS&lt;/span&gt;&lt;span style="color:#080808;"&gt;.&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ITEM&lt;/span&gt;&lt;span style="color:#080808;"&gt;(&lt;/span&gt;&lt;span style="color:#800000;"&gt;RANK&lt;/span&gt;&lt;span style="color:#080808;"&gt;([Date].[Date].&lt;/span&gt;&lt;span style="color:#800000;"&gt;CURRENTMEMBER&lt;/span&gt;&lt;span style="color:#080808;"&gt;, MYSET)-1).&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;NAME&lt;/span&gt;&lt;span style="color:#080808;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background:white;margin-left:36pt;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt;&lt;span style="color:#080808;"&gt; {MEASURES.MeasureUniqueName, MEASURES.MeasureDisplayName} &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt;&lt;span style="color:#080808;"&gt; 0, &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background:white;margin-left:36pt;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span style="color:#080808;"&gt;MYSET &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt;&lt;span style="color:#080808;"&gt; 1 &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background:white;margin-left:36pt;"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="font-size:10pt;color:#0000ff;"&gt;FROM&lt;/span&gt;&lt;span style="color:#080808;"&gt;&lt;span style="font-size:10pt;"&gt; [Adventure Works]&lt;/span&gt;&lt;span style="font-size:7pt;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution 2&lt;/strong&gt;: This approach is especially useful if you need the measure properties. In this case, you must use the OLE DB Provider for Analysis Services instead of the SSRS Analysis Services Provider (the one that gives you the nice MDX Designer). This approach uses the MDSCHEMA_MEASURES rowset, which is one of the built-in SSAS schema rowsets. Darren Gosbell provides a great overview of the SSAS rowsets &lt;a href="http://geekswithblogs.net/darrengosbell/archive/2008/02/21/ssas-2008-whats-new-in-the-schema-rowsets.aspx"&gt;here&lt;/a&gt; and Vidas Matelis gives more insights &lt;a href="http://www.ssas-info.com/VidasMatelisBlog/43_ssas-2008-ctp6-new-dmv-systemdiscover_object_activity"&gt;here&lt;/a&gt;. Thanks to the schema rowsets, getting a list of measures can&amp;#39;t simpler. &lt;/p&gt;
&lt;p&gt;SELECT * from $System.MDSCHEMA_MEASURES &lt;/p&gt;
&lt;p&gt;The user will require Read Definition rights (on Role Properties General&amp;nbsp;tab, check Read Definition) to obtain the metadata. If the user doesn&amp;#39;t have this right, an empty dataset will be returned. &lt;/p&gt;
&lt;p&gt;There are of course additional schema rowsets, such as MDSCHEMA_KPIS if you want to get a list of all KPIs or DBSCHEMA_TABLES in case you want to discover the cube dimensions and measure groups. BOL provides a full list &lt;a href="http://msdn.microsoft.com/en-us/library/ms126233.aspx"&gt;here&lt;/a&gt;. Aren&amp;#39;t SSAS schema rowsets cool? &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3199" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Analysis+Services/default.aspx">Analysis Services</category></item><item><title>Named Set Subtotals in Excel</title><link>http://prologika.com/CS/blogs/blog/archive/2009/01/27/named-set-subtotals-in-excel.aspx</link><pubDate>Tue, 27 Jan 2009 20:15:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3170</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;So many SSAS browsers, so little resemblance... And each browser has an independent view of which SSAS features it cares about and how it will go about implementing them. For example, Excel 2007 will let you use named sets on rows or columns but not as a filter. The cube browser and Report Builder let you use them in the filter area but not on columns and rows. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;: Business users have requested a subtotal for named set in Excel 2007. Say, you&amp;#39;ve defined the following named set in the cube to return the last 12 months from the current month. &lt;/p&gt;
&lt;p style="background:white;"&gt;&lt;span style="font-size:8pt;font-family:Verdana;"&gt;&lt;span style="color:#0000ff;"&gt;CREATE&lt;/span&gt;&lt;span style="color:#080808;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;DYNAMIC&lt;/span&gt;&lt;span style="color:#080808;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;SET&lt;/span&gt;&lt;span style="color:#080808;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;CURRENTCUBE&lt;/span&gt;&lt;span style="color:#080808;"&gt;.[Last 12 Months] &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="color:#080808;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background:white;"&gt;&lt;span style="font-size:8pt;font-family:Verdana;"&gt;&lt;span style="color:#080808;"&gt;[Date].[Date Hierarchy].&lt;/span&gt;&lt;span style="color:#800000;"&gt;CurrentMember&lt;/span&gt;&lt;span style="color:#080808;"&gt;.&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;Lag&lt;/span&gt;&lt;span style="color:#080808;"&gt;(11):[Date].[Date Hierarchy].&lt;/span&gt;&lt;span style="color:#800000;"&gt;CurrentMember&lt;/span&gt;&lt;span style="color:#080808;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you drop this named set on an Excel 2007 PivotTable report, you would notice that it doesn&amp;#39;t give you a subtotal that returns the aggregated total of the measure used in conjunction with the set. However, the chances are that you would need a server subtotal, especially if you use scope assignments to derive the subtotal value. By contrast, the cube browser will show the subtotal if you use the named set as a filter and drag the corresponding dimension (in this case Date) to the rows or columns. This difference of course originates from the MDX query the client generates. In the latter case, the cube browser hiearchizes the dimension All member so the server returns this member, while a named set would simply returns the members of the set and nothing more. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Workaround&lt;/strong&gt;: A simple workaround in Excel 2007 to get a subtotal is to add the dimension all member, such as: &lt;/p&gt;
&lt;p style="background:white;"&gt;&lt;span style="font-size:8pt;font-family:Verdana;"&gt;&lt;span style="color:#0000ff;"&gt;CREATE&lt;/span&gt;&lt;span style="color:#080808;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;DYNAMIC&lt;/span&gt;&lt;span style="color:#080808;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;SET&lt;/span&gt;&lt;span style="color:#080808;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;CURRENTCUBE&lt;/span&gt;&lt;span style="color:#080808;"&gt;.[Last 12 Months] &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="color:#080808;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background:white;"&gt;&lt;span style="font-size:8pt;font-family:Verdana;"&gt;&lt;span style="color:#080808;"&gt;{[Date].[Date Hierarchy].&lt;/span&gt;&lt;span style="color:#800000;"&gt;CurrentMember&lt;/span&gt;&lt;span style="color:#080808;"&gt;.&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;Lag&lt;/span&gt;&lt;span style="color:#080808;"&gt;(11):[Date].[Date Hierarchy].&lt;/span&gt;&lt;span style="color:#800000;"&gt;CurrentMember, &lt;br /&gt;&lt;/span&gt;&lt;span style="color:#080808;"&gt;&lt;strong&gt;[Date].[Date Hierarchy].[All]&lt;/strong&gt;} &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background:white;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background:white;"&gt;Of course, if the named set uses another dimension, you need to add the All member of that dimension. For example, adding a subtotal to the Adventure Works Top 50 Customers will require the following change: &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:8pt;font-family:Courier New;"&gt;&lt;span style="color:#0000ff;"&gt;Create&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Dynamic&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Set&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;CurrentCube&lt;/span&gt;.[Top 50 Customers] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:8pt;font-family:Courier New;"&gt;&lt;span style="color:#0000ff;"&gt;As&lt;/span&gt; {&lt;span style="color:#800000;"&gt;TopCount &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:8pt;font-family:Courier New;"&gt;( &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:8pt;font-family:Courier New;"&gt;[Customer].[Customer].[Customer].&lt;span style="color:#0000ff;"&gt;Members&lt;/span&gt;, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:8pt;font-family:Courier New;"&gt;50, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:8pt;font-family:Courier New;"&gt;[Measures].[Internet Sales Amount] &lt;/span&gt;&lt;/p&gt;
&lt;p style="background:white;"&gt;&lt;span style="font-size:8pt;"&gt;&lt;span style="font-family:Courier New;"&gt;), &lt;strong&gt;[Customer].[Customer].[All Customers]}&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#080808;font-family:Verdana;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Wish List&lt;/strong&gt;: Unify Microsoft-based browsers as much possible in terms of functionality. In this case, it will be nice, if Excel supports named sets as filters. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3170" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Analysis+Services/default.aspx">Analysis Services</category></item><item><title>Business Intelligence is Fifth Hottest IT Skill</title><link>http://prologika.com/CS/blogs/blog/archive/2009/01/15/business-intelligence-is-fifth-hottest-it-skill.aspx</link><pubDate>Thu, 15 Jan 2009 19:21:15 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3142</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;ComputerWorld &lt;a href="http://www.netcominfo.com/education/nine_hottest_it_skills_2009.phtml"&gt;ranks&lt;/a&gt; BI as the fifth hottest IT skill.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3142" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category></item><item><title>Implementing Cube Settings</title><link>http://prologika.com/CS/blogs/blog/archive/2009/01/13/implementing-cube-settings.aspx</link><pubDate>Wed, 14 Jan 2009 03:05:00 GMT</pubDate><guid isPermaLink="false">bb61d221-b363-4d22-8192-4aa25b39c5db:3140</guid><dc:creator>tlachev</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I had to tackle an interesting requirement the other day. A cube had a number of KPIs defined but the threshold values that were used to define the &amp;quot;good&amp;quot;, &amp;quot;bad&amp;quot;, and &amp;quot;so-so&amp;quot; status ranges had to be defined as configurable values at any level of the organization dimension and KPIs. I settled on implementing a measure group that intersects the organization dimension and a new KPI dimension that lists the KPI names. &lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.prologika.com/blog/011409_0257_Implementin1.png" alt="" /&gt; &lt;/p&gt;
&lt;p&gt;For example, as the screenshot shows, each KPI has two threshold values (Threshold Value1 and Threshold Value2) which can be defined at any level of the organization hierarchy. Note that the parent values read the setting values &lt;strong&gt;directly&lt;/strong&gt; from the fact table instead of being derived by rolling up from the children. &lt;/p&gt;
&lt;p&gt;The first implementation approach that comes to mind is to use the None AggregateFunction function for the measure group so you read the measure values associated with the member directly from the fact table. Some experimenting revealed the following &amp;quot;noble&amp;quot; truths about the None AggregateFunction: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms175623.aspx"&gt;BOL&lt;/a&gt; is wrong. I refer to the following statement:&lt;br /&gt;&lt;em&gt;(None AggregateFunction) No aggregation is performed, and all values for leaf and nonleaf members in a dimension are supplied directly from the fact table for the measure group that contains the measure. If no value can be read from the fact table for a member, the value for that member is set to null.&lt;/em&gt; &lt;/li&gt;
&lt;p&gt;Specifically, When None is used, the server loads the fact data into the measure group leaves (just like with other aggregate function) but it doesn&amp;#39;t roll up the values to the dimension leaves. See this Mosha&amp;#39;s &lt;a href="http://www.sqljunkies.com/WebLog/mosha/archive/2006/04/29/leaves.aspx"&gt;post&lt;/a&gt; to understand the difference between the dimension and measure group leaves. &lt;/p&gt;
&lt;li&gt;The way it stands, the None function brings a questionable value. A narrow case exists where you may want to perform assignments or calculations in the measure group leaves as the above post demonstrates. Why you would want to do this instead performing them at the fact table level (or as named calculations) for obvious performance advantages is beyond me. &lt;/li&gt;
&lt;li&gt;There is no way to bring the measure leaf values to the dimension leaves. Shoot me a note if you manage to come with some clever hack to do so. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note&lt;/strong&gt;: It would have been great if the None function behaves as described in the documentation. Even better, it could be nice if the server automatically brings up the fact value when the cube slice results in one fact record, i.e. the user has drilled down to measure group grain. This will make it possible to implement text-based measures, such to capture comments, or other text-based attributes, that don&amp;#39;t justify moving them to a dimension. If you agree, vote for this enhancement on connect.microsoft.com. &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So, how do we get around this predicament? One option is define a custom &lt;strong&gt;~&lt;/strong&gt; operator for the Organization parent-child dimension so the server doesn&amp;#39;t roll up the measure. However, the custom operator will be applied to all measures sliced by the Organization dimension which more than likely will be an issue. Of course, a trivial workaround is to duplicate the Organization dimension but this leads to other disadvantages. IMO, a better solution might be to use the DataMember &lt;a href="http://msdn.microsoft.com/en-us/library/ms145608.aspx"&gt;property&lt;/a&gt; and a scope assignment: &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:9pt;font-family:Courier New;"&gt;&lt;span style="color:#0000ff;"&gt;SCOPE&lt;/span&gt; ( &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:9pt;font-family:Courier New;"&gt;&lt;span style="color:#800000;"&gt;MeasureGroupMeasures&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;KPI Configuration&amp;quot;&lt;/span&gt;), &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:9pt;font-family:Courier New;"&gt;[Organization].[Organization Hierarchy].&lt;span style="color:#0000ff;"&gt;Members&lt;/span&gt;, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:9pt;font-family:Courier New;"&gt;[KPI].[KPI].[KPI] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:9pt;font-family:Courier New;"&gt;); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:9pt;font-family:Courier New;"&gt;&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt; = ([Organization].[Organization Hierarchy].&lt;span style="color:#800000;"&gt;CurrentMember&lt;/span&gt;.&lt;span style="color:#800000;"&gt;DataMember&lt;/span&gt;); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:9pt;font-family:Courier New;"&gt;&lt;span style="color:#0000ff;"&gt;END&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;SCOPE&lt;/span&gt;; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I scope at the KPI Configuration measure group where it intersects with the members of the Organization and KPI dimensions. The AggregationFunction property of the measures in the KPI Configuration measure group is now set to SUM. The tuple on the right side of the &lt;span style="font-size:9pt;color:#0000ff;font-family:Courier New;"&gt;this&lt;/span&gt; assignment returns the measure value associated directly with the current data member. The new result is that this assignment overwrites the SUM function with the measure leaf value. &lt;span style="font-size:9pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://prologika.com/CS/aggbug.aspx?PostID=3140" width="1" height="1"&gt;</description><category domain="http://prologika.com/CS/blogs/blog/archive/tags/Analysis+Services/default.aspx">Analysis Services</category></item></channel></rss>