Chris Umbel

Accessing SimpleDB from SSRS

Amazon Web Services (AWS)Largely for my own amusement recently I became interested in the idea of accessing Amazon's SimpleDB from SQL Server Reporting Services. After searching around the web for a while I realized the only solution I'd be happy with was to write my own data processing extension for SSRS that can access SimpleDB.

For those of you not familiar with SSRS data processing extensions they're simply libraries that teach reporting services how to talk to data sources. They merely require you to implement a few interfaces such as IDbCommand, IDbConnection and IDataReader from Microsoft.ReportingServices.DataProcessing. A great introduction to developing these extensions can be found here.

After a few days of work I got a decent start on a library written in C# 2008 named SimpleDBExtension that I've published here on CodePlex. At the time of writing it's still in early development so please be forgiving (Update 2009/12/07: it's in it's first beta.). There's certainly a major refactoring on the way and several features I'd like to add.

To develop reports in Visual Studio against SimpleDB with this library there's just a few simple steps which are outlined below:

Step 1: Build and install SimpleDBExtension library

After building the SimpleDBExtension project copy the resultant SimpleDBExtension.dll into the directory Visual Studio uses for the Report Designer. On my system that is: C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies

Step 2: Modify RSReportDesigner.config

Add the following node to the data extensions section in RSReportDesigner.config which is located in the aforementioned directory.

<Extension Name="SIMPLEDB" Type="SimpleDBExtension.SimpleDBConnection,SimpleDBExtension"/>

Step 3: Modify RSPreviewPolicy.config

Add the following node to the code groups section in RSPreviewPolicy.config which is also located in the aforementioned directory. You'll have to modify the URI attribute to reflect the directory you're working in.

<CodeGroup class="UnionCodeGroup"
   version="1"
   PermissionSetName="FullTrust"
   Name="SimpleDBExtension"
   Description="Code group for SimpleDb data processing extension">
	  <IMembershipCondition class="UrlMembershipCondition"
		 version="1"
		 Url="C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\SimpleDBExtension.dll"
	   />
</CodeGroup>

Step 4: Develop

Since Visual Studio's Report Designer is prepared we can get down to business. Get started in the typical fashion: create a report project and a report.

Here's where it gets different. An additional data source type will now be available named "SIMPLEDB" which will employ the extension you just installed. Choose that and and enter your access key and secret separated by a semicolon in the connection string.

Now you can create a DataSet using the newly created Data Source. Supply a SimpleDB select query and you're all set. Your SimpleDB data is now accessible to SSRS.

Next Steps

Thus far we've just installed the extension into Visual Studio but this process can be used to deploy the extension to a Report Server.

Again, at the time of writing this project is just a few days old. Any help, guidance, or comments are appreciated.

Wed Jul 22 2009 19:07:46 GMT+0000 (UTC)

Follow Chris
RSS Feed
Twitter
Facebook
CodePlex
github
LinkedIn
Google