Reporting Services 2005 Tips and Tricks Web Seminar

WindowsITPro invited me to deliver a web seminar about RS 2005. Instead of picking up a particular area and focusing solely on it, this time I will be going for a “tips and tricks” type of session which will cover new ways to do things that were difficult if not impossible to implement with RS 2000. The topics will cover the three phases of the report lifecycle – authoring, management, and delivery. Unfortunately, due to technology constraints, I won’t be able to share my desktop and do live demos. Anyway, I think it is going to be an exciting session. I hope you will be able to make it.  

Reporting off ADO.NET datasets using the RS 2005 XML Extension

In case you missed this little gem, RS 2005 comes with a brand new XML Extension which allows you to report off an XML data returned from an URL-addressable resource, such as an ASP.NET page or a web service. For example, suppose that you have a web method called GetOrders that return the customer orders as a typed dataset (table in my case) and has the following signature:


 


[WebMethod]


public CustomerOrders.SalesOrderHeaderDataTable GetOrders(int customerID)


 


You can create a report from the returned dataset by using the RS 2005 XML dataset extension:




  1. Create a data source that uses the XML extension by selecting XML as the data source type.


  2. Enter the URL address of the web service in the connection string, e.g. #


  3. Once the data source is ready, create a dataset with the following query:

 <Query>


   <Method Namespace=”http://tempuri.org/” Name=”GetOrders”/>


   <SoapAction>http://tempuri.org/GetOrders</SoapAction>


   <ElementPath IgnoreNamespaces=”true”>GetOrdersResponse/GetOrdersResult/diffgram/DocumentElement/SalesOrderHeader</ElementPath>


</Query>


 


Unfortunately, the documentation stays shy about all the parameters supported by the XML extension but it is fairly easy to deduce what’s going on here.


The Method element describes the web method to be called. This is somewhat redundant since the SoapAction element does the same and explained in more details here. The ElementPath describes the full XPATH to the elements to be retrieved and flattened in a two-dimensional resultset. Finally, the IgnoreNamespaces attribute tells the XML extension to ignore any schema namespaces when parsing the XML content.


 


   4. To pass a parameter(s) to the web method, use the Parameters tab and link the report parameter to the query parameter as usual, e.g:


 


Name                          Value


customerID              =Parameters!CustomerID.Value


 


One cautionary note that bit me really bad is that the parameter name is case-sensitive and must much the argument name of the web method verbatim. Thus, if you change the parameter Name to CustomerID, you will find out that the XML extension doesn’t pass the parameter value.


 


Thanks for to the XML Extension, in my cases, reporting off XML data from URL-addressable sources may not require a custom data extension with RS 2005. Happy reporting!

In search for scalability

Just to let you know that I am aware that my website (prologika.com) is dog slo-o-o-w. I can hear my aging web server is praying for mercy from a mile. The good news is that I’ve just ordered a new Dell server. It sure will make a difference. It will take a few days to get and configure the server. I hope I will be able to scale before Thanksgiving.


So please be patient!

My blog address has changed

I have to apologize for the late news. I thought that I can get .Text and Community Server co-existing peacefully on the same machine, so I could post a notice of the blog address change through .Text once I am done installing and switching to the Community Server. Alas, .NET Framework 2.0 and .Text didn’t go along very well… Oops!


 


If you read this, you already know my new blog address but for whatever it is worth, please update your readers accordingly. The next time I will be less excited with upgrades J

SQL Server 2005 LoadFest

Atlanta.mdf is hosting a LoadFest event to celibrate the launch of SQL Server 2005. They asked me to stop by and answer tough Business Intelligence questions.. Time permitting, I may do a demo or two.

You may also put in your calendar my next presentation for Atlanta.mdf on 9/1/2006 when I will talk about Analysis Services 2005.

 

See ya there!

SQL Pass 2005 slides and code

SQL Pass 2005 was a great show. It had about 2,000 attendees, which is great si nce you don’t feel disconnected in the TechEd crowd of 13,000 people. I did a “RS Tips, Tricks, and Gotchas” presentation with Bruce L-C whom I finally had a chance to meet. I think the presentation went very well. I’ve uploaded the slides and the sample code to my website. Among other things the code demonstrates:




  • Excel export scenarios


  • CSV export


  • External images streamed from a web service


  • Expression-based connection strings


  • CLR stored procedures


  • HTTP handler for intercepting the incoming traffic to the server


  • And more…

Happy reporting!

To the summit

If you are attending SQL Pass event next week in Grapevine, TX and you would like to know more about Reporting Services, stop by to my presentation. I am teaming with Bruce Loehle-Conger (MVP – SQL Server) to present the Reporting Services Tips, Tricks and “Gotchas” session.


 


I have some cool demos that demonstrate retrieving images from a web service, dynamic connection string from configuration file, Analysis Services integration, using CLR stored procedures, and more… If you are not coming, I will upload the code demos on this site after the event.


 


See you in Texas!

SQL Server September CTP reloaded

In addition to my previous post about installing CTP, here are some additional notes: 




  1. After you uninstall the previous version of SQL Server, make sure to delete all database files in C:\Program Files\Microsoft SQL Server\MSSQL\Data. The setup program will comlain about them.


  2. If you are upgrading a previous CTP and you are running into performance issues, try the Registry Mechanic. It found 500 registry issues on my machines and it fixed an issue with the ASPNET account not having enough permissions (I don’t have the exact event log entry).

SQL Server September CTP and VS.NET RC are here!

 If you are subscribed to Microsoft Beta, you can downoad the SQL Server September CTP and Visual Studio Release Candidate (plan for a day or two given the 30K connection speed) from the Microsoft betaplace website.


Here are the steps I was taking to install both SQL Server CTP and Visual Studio.NET RC that you may find helpful. I had SQL Server 2005 June CTP and Visual Studio 2005 Beta 2 installed prior to installing the new bits and the upgrade went fine for me. You may not need to be so reboot-oriented but I like to start from a clean state just in case J. 



  1. Uninstall SQL Server 2005 by running the Cleanup Wizard (Setup Tools\Build Uninstall Wizard\sqlbuw.exe on the SQL Server 2005 CTP CD). Make sure to select .NET 2.0 and Native Client (Microsoft SNAC) options.
  2. Reboot
  3. Remove all files from the C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data folder.
  4. Uninstall VS.NET 2005.
  5. Reboot
  6. Go to Add/Remove Programs in Control Panel and remove the rest of the VS.NET 2005 and SQL Server 2005 components, including:



    • MSDN Product Documentation
    • Microsoft Visual Studio Tools for Office System 2005 Runtime Beta 2
    • Microsoft Device Emulator 1.0 Beta 2
    • Microsoft .NET Compact Framework 2.0 Beta 2
    • Microsoft SQL Mobile 2005 Development Tools
    • Microsoft Visual J# Redistributable Package 2.0 Beta 2
    • Microsoft Visual J# Language Pack 2.0 Beta 2
    • MSXML 6.0 Parser and SDK
    • Microsoft Visual Studio 2005 64bit Prerequisites Beta 2 (Only on 64bit)
    • Microsoft .NET Framework 2.0 SDK Beta 2 (Only on 64bit)
    • Microsoft Visual Studio 2005 64bit Remote Debugger Beta 2 (Only on 64bit)
    • Microsoft Data Access Components 2.8 SP1 (Only on Windows 2000)


  1. Install SQL Server 2005 CTP September Server components (D:\Downloads\SQL Server\CTP Sep\Servers\Setup.exe)
  2. Install SQL Server 2005 CTP September Server components (D:\Downloads\SQL Server\CTP Sep\Tools\Setup.exe)
  3. Reboot
  4. Install VS.NET 2005 RC
  5. Reboot
  6. Install Visual SourceSafe 2005 from the VS.NET DVD.

There are only a few breaking changes I have come across so far with the previous release. The VS.NET Unit test namespace have changes and the WinForm Report Viewer has dropped some properties.

SP2 Hotfix available

Microsoft has released a hotfix for SP2 that fixes a few items in SP 2. Specifically:



  • HTML Viewer Style Sheet Configuration Property Missing from Service Pack 2.

  • Incorrect line breaking or random formatting issues with MHTML.

  • Leaving and returning to the Schedule Page from the Subscription Properties page causes dependent report parameters to be disabled, then reset to the first or default value.

  • Tables exported to CSV may lose the first row of data.

Download the hotfix here.