Rules Have Changed

An interesting question has pop up on the Katmai RS 2008 discussion list today about how to implement a “green bar” group-level report that alternates background color for all rows in a group instance instead of doing this for each row. I attach the report sample I posted. What makes it interesting is that it demonstrates report variables – a new feature in RS 2008.

Before you start analyzing it, you should know that expression evaluation rules in RS 2008 have changed as a result of the new on-demand processing model. As a result, state in class-level instance variables is discarded as you page through the report which makes maintaining state trickier between page requests. However, RS 2008 introduces report variables that guarantee one-time evaluation semantics. I know this may sound to you like Greek, so let me jump into the implementation details:

1. The report has a EvenRow code-behind function that toggles each time it’s executed.

2. In the Category group (double-click it to access its properties), an EvenRow group level variable is defined that invokes the EvenRow function once per each group instance.

3. The rest is easy. I set the BackgroundColor property for each textbox to use this variable. BTW, the report uses the SSAS Adventure Works cube. [View:/CS/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/blog/greenbargroup.zip]

Yet Another Post About Analysis Services HTTP Connectivity

With risk to iterate the obvious, here is a lesson learned from the trenches:

Scenario: You want to let external users browse an Analysis Services cube over the Internet.

Setup: You have followed the steps in the Configuring HTTP Access to SQL Server 2005 Analysis Services on Microsoft Windows Server 2003 article by Edward Melomed to set up Analysis Services for HTTP connectivity.

Issue: Windows integrated security doesn’t work.

After a long battle where countless options have been tried, I have to admit a defeat. In our case, we’ve set up identical Windows local accounts on the SSAS server. This worked fine when connecting Report Builder 2.0 to the cube from our home machines. However, it appeared that the firewalls that our clients use make a minced meat of Windows integrated security. Strangely, Excel connects without a problem to the cube using Windows integrated security. However, Report Builder 2.0 chokes big time. I guess this has to do with differences between OLE DB (which Excel uses) and ADOMD.NET (used by Report Builder 2.0).

So, we had to give up on Windows integrated security over Internet. Instead, we went for Basic security with SSL, as follows:

  1. Configure the msmdpump virtual folder for Basic security (this should be the only available security option).
  2. Install the SSL certificate on the IIS server.
  3. In Report Builder 2.0, set up a new data source that uses the Microsoft SQL Server Analysis Services. Click the Edit button on the Data Source Properties dialog box.

080208_0230_YetAnotherP1

  1. In the Connection Properties dialog, enter the URL to the msmdpump.dll, such as https://adventure-works/olap/msmdpump.dll.
  2. Enter the user credentials. Click the Save My Password to avoid being asked to retype the password.
  3. Here is an important step if you want to populate the Connect to a Database drop-down list. Click the Advanced button and locate the Integrated Security setting. Select and clear the SSPI default setting. Click OK.
  4. Back to the Connection Properties dialog, expand the Connect to a Database drop-down list. You should see the list of the SSAS databases the user has rights to access. Select a database.
  5. Click the Test Connection dropdown. The connection should succeed.

The data source is set up now. You can proceed with setting up a dataset with the MDX Query Designer.

A Must-read Reporting Services Blog

Robert Bruckner on the Reporting Services team has started a blog. Robert oversees several key areas of Reporting Services, including Report Definition Language (RDL), data processing, report processing, data visualization, and performance/scalability. Many of you have gotten help from Robert on the Reporting Services discussion lists to which he frequently contributes. So, this sure it’s going to be a must-read blog as his first posts (report variables and scalability) show.

RS Blog Roll

Bob Meyers’ Blog

(http://blogs.msdn.com/bobmeyers)—Bob Meyer is a Program Manager on the Reporting Services team who is responsible for Report Builder 1.0.

Brian Welcker’s Blog

(http://blogs.msdn.com/bwelcker)—Brian Welcker is a former Group Program Manager on the Reporting Services team.

Chris Baldwin’s Blog

(http://blogs.msdn.com/chrisbal)—Chris Baldwin is a Program Manager on the Reporting Services team who oversees the report rendering area.

Chris Hays’s

(http://blogs.msdn.com/chrishays)—Chris Hays is an architect on the Reporting Services team and oversees the Report Definition Language.

John Gallardo’s Blog

(http://blogs.msdn.com/jgalla)—John Gallardo is a Software Development Engineer on the Reporting Services team who is responsible for the report server.

Lukasz Pawlowski’s Blog

(http://blogs.msdn.com/lukaszp)—Lukasz Pawlowski is a Program Manager on the Reporting Services team who is primarily responsible for the management feature of the product.

Reporting Services Team Blog

(http://blogs.msdn.com/sqlrsteamblog/)—A collective blog of the Reporting Services team.

Reporting Services User Education Blog

(http://blogs.msdn.com/rosettaue)—From the user documentation team which is responsible for creating all the documentation that ships with the product.

Robert Bruckner’s Blog

(http://blogs.msdn.com/robertbruckner)— Robert Bruckner is a Software Development Engineer on the Reporting Services team who oversees Report Definition Language (RDL), data processing, report processing, data visualization, and performance/scalability.

Russell Christopher’s Blog

(http://blogs.msdn.com/bimusings)—Russell Christopher is a Business Intelligence consultant with Microsoft who posts great insights about working with Reporting Services.


It’s Done

A quick update on my book Applied Microsoft SQL Server 2008 Reporting Services. I am happy to announce that the work on the manuscript is over and the manuscript RTM’d (released to manufacturing). The paper copy should be available on the reseller sites and brick and mortar stores around the publication date (August 15th). Expect the ebook version around that time as well. Of course, the good thing about the ebook version besides being searchable and portable is that it includes color images. As you would probably agree, color is a good thing when you are studying report design. Video demos are even better, of course, which brings me to the next topic.

While waiting, take a look at the book web page that just went live and check the available resources. Among other things, you’ll find two sample chapters (chapters 1 and 3), the book source code, and video demos, which I captured using the awesome TechSmith Camtasia. The videos are bonus material and are an experimental feature. Video demos are provided for a subset of the report authoring practices covered in the book. I am looking forward your feedback about this feature. Enjoy and I hope you don’t mind my thick as a brick accent J

Finally, the book web page includes a link to a discussion list, where you can make comments about the book and ask book-related questions. The new discussion list will replace my Reporting Services in Action discussion list, which will retire at the end of this month after four years of service. I hope you liked my participation and will consider “upgrading” to the new discussion list and book.

Automating Report Deployment

Here is an awesome tip courtesy to the Craig Guyer’s I Command Thee blog. You probably know that Visual Studio supports project configurations. In BIDS 2008, you can automate report deployment with configurations. For example, the following command deploys the solution using the settings of the QA configuration.

C:\>devenv “C:\Books\RS2008\Code\ch03\Reports\Reports.sln” /deploy QA

This is especially useful when automating deployment to SharePoint because you need to change the report definitions to use absolute paths to external resources, such as shared data sources. BIDS deployment can handle this for you and save you writing custom code to automate deployment.

While we are on the SharePoint deployment topic with BIDS, one nasty bug was introduced late in the SQL Server 2008 cycle that prevents you deploying folders that contain a space, such as Data Sources, to SharePoint from BIDS. When you attempt to do this, you get:

Error rsInvalidItemName : The name of the item ‘Data%20Sources’ is not valid. The name must be less than 128 characters long. The name must not start with slash; other restrictions apply.

If the folder already exists, deployment is successful. Unfortunately, due to time constraints, this bug won’t get fixed in the RTM timeframe. As a workaround, don’t use spaces in the target folders, e.g.; DataSources instead of Data Sources.

SQL Server 2008 Available on August Price List

Courtesy to Francois Ajenstat, Director of Product Management for Microsoft SQL Server, we know that SQL Server 2008 is on the August price list. What this probably means according to my interpretation is that the SQL Server 2008 RTM date is close. More than likely, SQL Server 2008 will be released in August.

Textbox on Steroids

One of the new features in Reporting Services 2008 that debuted in the SQL Server 2008 RC0 build is the enhanced textbox report item. In previous releases, if you wanted to mix static and dynamic expression-based text, you either needed multiple textboxes or a Visual Basic expression to concatenate strings together. The first approach led to textbox “explosion”. The disadvantage of the second approach was that you couldn’t format string fragments inside the same textbox independently.

 

In Reporting Services 2008, the textbox report item has been redesigned to support multiple bands of text. The screenshot shows a report title of a sales order report. In the past, you w061908_1813_TextboxonSt1ould need two textboxes (or three if you wanted different formatting for the sales order number). You may be surprised to find that the entire title is implemented as a single textbox with two paragraphs. The second paragraph combines static text (Order #:) with dynamic text ([SalesOrderNumber]), which defines a placeholder for a dataset field value. Each fragment can have its own format settings. Thanks to these enhancements, you’ll find that by moving to Reporting Services 2008, you need fewer textboxes and you need to write less often expressions that concatenate text. Moreover, the new textbox lets you implement report solutions, such as mail merge, that were difficult or impossible to implement with previous releases.

Many report authors will rejoice learning that the textbox report item now supports a subset of HTML tags for formatting the text content. This is also known as rich formatting (not be confused with RTF which is not supported). You can import static HTML text or bind the textbox to a dataset field. For instance, if the dataset field includes HTML tags, such as <b>SO50750</b>, you can configure the textbox to interpret these tags and display the sales order number in bold.

SQL Server 2008 RC0 Product Samples Refreshed

Microsoft has refreshed the product samples and AdventureWorks databases. I still have to figure out what’s the AdventureWorksAS2008 database that is not released yet.

Microsoft SQL Server 2008 Feature Pack RC0, June 2008

Today, Microsoft released an updated feature pack for SQL Server 2008 RC0. Among other things, it includes:

  1. A web downloadable installer for Report Builder 2.0 which is not included anymore with the SQL Server 2008 setup
  2. An updated version of the RS add-in for SharePoint
  3. Analysis Services 10.0 OLE DB Provider

SQL Server 2008 Release Candidate 0 (RC0)

Microsoft declared build #1442.32 to be the official SQL 2008 RC0 build and made it publicly available.

Key SSRS improvements in this build:

  1. Rich text formatting. You can now format the text inside a textbox with different styles.
  2. Report Wizard to let the user auto-generate the report definition.
  3. Fully functional MDX Query Designer.
  4. An updated build of the Report Builder 2.0 (aka Report Designer Preview) will be available via a web download. The URL link is not known at this point.