Into the Multi-dimensional Space

Lately, I’ve run into a few “multi-dimensional” posts in the public SSRS newsgroup. It seems like more and more people target SSAS 2005 cubes as a reporting source. It looks like I am not the only one who have noticed this trend. Brian Welcker has recently commented about the SSRS-SSAS integration in his Fingerpops blog. Here are some notes based on my experiments with the MDX Query Designer.


Limitations
The promise of the MDX Query Designer (implemented by the SSAS team) is giving the report author a tool to produce easily SSAS-based reports without requiring MDX knowledge. Unfortunately, the MDX Query Designer and SSRS integration has left a substantial ground for improvement. For example, it should allow dropping levels of a parent-child dimension on rows to produce the report similar to this one.


I can produce this report in the SSAS cube browser (or another OLAP browser) in seconds. However, the MDX Query Designer doesn’t allow me to request dimension levels side-by-side. I understand that the SSRS can consume only flattened datasets but this doesn’t explain why the MDX Query Designer lacks behind the cube browser which uses OWC to display the results in a two-dimensional format as well. So, my SSAS-SSRS wish #1 is to see the MDX Query Designer support the same functionality as the SSAS cube browser.


Aggregates
There are two ways to request data from an SSAS cube – cellset (hierarchical) and rowset (two-dimensional). SSRS uses the second format which is, of course, more natural for relational reporting. SSRS is not an OLAP browser and it should be viewed as such. Unfortunately, as a result of flattening the data, the SSAS aggregates (All and level aggregates) are lost. You may wonder why on earth you may need the SSAS aggregates instead of re-calculating them using the SSRS Sum(), Avg(), etc. functions. Well, the short answer is that SSAS may go far beyond the standard aggregate functions. For example, the Account dimension in the report above uses custom operators to roll up account categories. For example, income categories add up while expenses subtract. This is why the Balance Sheet Total in the report is $0. Using account charts is a cornerstone of financial reporting. If you can’t bring the SSAS precious aggregates, you have no other choice but to re-invent SSAS with relational reporting which is something you should avoid.
The good news is that SSRS can ask SSAS for the “lost” aggregates. If this is the case, the Aggregates element of the MdxQuery element in the report RDL file won’t be empty, e.g.:
<Aggregates><Aggregate><Levels /></Aggregate></Aggregates>


Here is a trick to make SSRS ask for aggregates:



  1. Use the graphical MDX Query Designer to produce interactively the report dataset.
  2. Switch to the Layout tab and author your report.
  3. In a texbox inside the report Group, enter the expression =Aggregate(Fields!<FieldName>.Value), where FieldName is the field that you need to aggregate.
  4. Save the report.

If all is well, the Aggregates element will be populated and the Aggregate function will return the SSAS aggregate value. However, the problem in the aggregate story is that:



  • Sometimes SSRS refuses to ask for these aggregates.
  • It is not clear what you could do on your part to help it out.
  • The Aggregates RDL syntax is not documented and you don’t know how to force the MDX query to bring the aggregates.

For example, I attempted to produce the above report by manually creating the MDX statement. While I succeeded to some degree, I wasn’t able bring the aggregates. Neither I was able to produce the sample report with the groups I wanted.


In conclusion, SSAS and SSRS could be a winning combination for OLAP and relational reporting. I hope that future service packs and releases will improve the SSRS and SSAS integration and preserve the fidelity of the cube data.

Web ReportViewer and Multi-value Parameter Bug (or how I spent my weekend)

This weekend, I was working on the second part of my Report Viewers article for DevX. As usual, it all started with an innocent idea which turned out into a whole-day affair. I wanted to demonstrate how to integrate the VS.NET 2005 web ReportViewer with a server report that takes a multi-value parameter. Of course, to save time to lay out the presentation layer, I decided to use absolute positioning for my web controls. Much to my surprise, the ReportViewer wouldn’t expand the multi-value parameter. It would helplessly repost the page each time I would click on a report parameter.


So, I got on an ambitious and arduous quest to find out what I am doing wrong. The most puzzling finding was that the Report Manager (which behind the scenes uses the web Report Viewer) would render the report just fine. This left me utterly perplexed and convinced that I am doing something terribly wrong.  And I’ve started changing stuff around. I fixed a bunch of other issues, including some mysterious DCOM events that were logged in the Event Viewer, but the ReportViewer won’t budge.


Finally, I created a new page, dropped the ReportViewer, and configured at design time, and sure it rendered the report just fine. It turned out that there is a bug with the ReportViewer and multi-value parameters because they use absolute positioning as well. As far as I know, the only workaround for now is to change the hosting page layout to use flow positioning instead.


So, stay away from absolute positioning until this ugly bug is fixed.

My book is selling from Amazon and B&N

At last, my book “Applied Microsoft Analysis Services 2005” is available for purchase from the retail outlets, including Amazon and Barnes & Noble. This completes the arduous and time-consuming book lifecycle which readers are probably unaware of. Here is how it goes… Once the author hands off the final manuscript to the publisher, the publisher sends the electronic copy to the printer. In the case of my book, it took one month for the printer to produce the book. Next, the printer ships the book to the distributor. Then, the distributor sends the books to the wholesalers (Ingram and Baker & Taylor). 


Retailers, such as Amazon and B&N, get the books from the wholesalers. So, from the time the book is received from the distributor, it takes another 30 or so days until the books fill the channels. So, setting the book publication date on Amazon is nothing more than an educated guess about events that are completely out of the publisher’s control. This is only half of the story, of course. If the retailers don’t sell the book in six months, the retailers return the books to the distributor and the book is re-stocked. But this won’t happen to my book, right? 🙂

RS 2005 RDL Available

In his blog, Brian Welcker (Group Program Manager for Reporting Services) announced yesterday the arrival of the much anticipated RDL 2005 specification.

RS 2005 Tips and Tricks Code Available

The code samples for my web seminar “Reporting Services 2005 Tips and Tricks” can be found here. They include:



  • Using external images (URL and web service)
  • Expression-based connection strings
  • XML extension to render ADO.NET datasets streamed from a web service
  • OLAP report from SSAS
  • CLR stored procedure integration
  • ASP.NET Handler to echo in the incoming URL and SOAP requests to the Report Server
  • WinReporter demo that demonstrates the WinForms ReportViewer in remote and local mode.

New Wave of Presentation Delivery – Web Seminars

Yesterday, I delivered a web seminar for WindowsITPro (sponsored by Microsoft) about RS 2005. I have to admit that I really enjoy it. I got more than 340 attendees. This broke my previous of record of 300 for my RS presentation at TechEd Europe 2004. The best thing about a web seminar is that you do it from the comfort of your house or office. No travel, hassle, and travel expenses. No cell phones and other annoying sound effects. Enjoy the silence! The questions get logged in an orderly fashion, so you could preview them before you answer (or don’t :-)). You can do polls too. What could be better?


 


The only negative thing about this particular seminar is that I was restricted to static content only and I couldn’t share my desktop for live demos. This was a limitation of the technology WindowsITPro is using, of course. Microsoft Live Meeting is perfectly capable of desktop sharing.


 


I hope the web seminars will catch up and I can do more of them in future. You can find the slides and demos of my Reporting Services 2005 Tips and Tricks web seminar here.


 


See you soon in cyberspace!


SQL Server 2005 Documentation Refresh

Microsoft has released a refresh of the SQL Server 2005 documentation. On the same page, you will find also a link to a SQL Server 2005 Samples and Sample Databases download.

Great Plains Report Pack


Microsoft has come up with a new Report Pack for Great Plains which uses SQL Server Reporting Services and comes with a number of report templates.

Using SQL Reporting Services 2005 and Forms Authentication with the Whidbey/2.0 SQLMembershipProvider

As you probably know, when the RS Windows-based security doesn’t meet your requirements, you can replace it with custom security. Not many products out there allow you do this. In hist blog, Russell Christopher explains how you can use the Whidbey/2.0 SQLMembershipProvider with custom security.

KPIUtil Tool Released

Courtesy to the Marco Russo’s blog, I’ve learned that Microsoft released a KPIUtil tool for Microsoft Office Business Scorecard Manager 2005.The tool allows users to export KPIs from both a Microsoft Office Business Scorecard Manager 2005 server and a Microsoft SQL Server 2005 Analysis Services server.