DIY: Alternative Reporting Services client

The other day I was looking for an alternative Reporting Services client, as an extra client besides the web-based Report Manager. As I couldn’t really find one I thought “how difficult could it be to write one myself?”.

And indeed, with the ReportViewer control in Visual Studio 2005 it’s really no big deal. All you need to do is drag the control onto a form, tell it that you want to load a remote report, configure the ReportServer so that it knows where to look for reports and the ReportPath so that it knows what report to load. Then call the RefreshReport() method to load the report.

When configuring the ReportPath, pay attention to the mandatory leading slash.

   1: reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
   2: reportViewer1.ServerReport.ReportServerUrl = new Uri("http://localhost/reportserver");
   3: reportViewer1.ServerReport.ReportPath = "/My Reports/ReportName";
   4: // load report
   5: reportViewer1.RefreshReport();

The C# code snippet above is loading a report called ReportName, located on the local report server in a folder called My Reports.

Update: how to browse the reports on the server

Microsoft has provided an interesting sample called RSExplorer as part of the SQL Server samples, located at CodePlex.  Once you’ve installed the samples you can find RSExplorer in C:\Program Files\Microsoft SQL Server\90\Samples\Reporting Services\Application Samples\RSExplorer Sample\, if you chose to install to the default folder.

The sample shows how to use the Reporting Services web service to populate a WinForms ListView with a list of folders and reports, and even how to do some basic management tasks like creating a folder or editing a report description.

When you double-click a report it will open in a popup window.  What I do find funny in this sample is that the popup window, called ReportViewer, does not use the ReportViewer control.  It uses a WebBrowser control  instead.


Tags: , , , ,

  1. Mark T’s avatar

    I think displaying the rpeorts is pretty easy, what I have been looking for is some form of alternative to the report selection part of Report Manager. I don’t want to create a hard coded page of links, I want it to detect the reports in the folders, but lay them out in a better, more customisable way.

    Have you ever come across anything suitable in your research.



  2. Valentino Vranken’s avatar

    Thanks for the interesting question Mark. I was actually wondering about it myself when I wrote the article but didn’t have the time to investigate at that moment. Now I do have the time and found an answer :-)

    I’ll add an update to the article above. In short: it can be done by using the SSRS web service.


  3. Nathan Patrick’s avatar

    Full disclosure, I work at Windward.

    As an alternative to SSRS, Windward’s Autotag detects the reports and data just like you mentioned. It can pull from any source SSRS can, plus a few more. We put together a comparison of SSRS and AutoTag if you’re interested!


  4. 5’s avatar

    It’s an awesome post designed for all the online viewers; they will
    get benefit from it I am sure.


  5.’s avatar

    It’s difficult to finmd knowledgeable people about this topic, but
    you seem like you know what you’re talking about! Thanks


  6. Blanca’s avatar

    I have read so many posts on the topic of the blogger lovers however this
    piece of writing is genuinely a pleasant paragraph, keep it up.


  7. Justin Laughead’s avatar

    Fantastic beat ! I would like to apprfentice while you amend your site,
    how could i subscribe for a blog website? The account hdlped me a acceptable deal.
    I had been a little bit acquainted of this your broadcast provided bright clear concept


  8. wipe off table and chairs quedgeley’s avatar

    I believe that is among the most vital info for me.

    And i’m satisfied studying your article. However
    should commentary oon few basic things, The web site taste is
    wonderful, the articles is actually excellent : D. Excellent job, cheers


© 2008-2019 BI: Beer Intelligence? All Rights Reserved