Using external data with umbracoStats

05 July 2006 by Niels Hartvig

In the premium version of umbracoStats it's possible to use external databases for the reports.

This means that you can use umbracoStats for other things than just umbraco data. And it's very simple to do - here's how to show data from the legendary Northwind database:
Northwind sample report
Add a connection string to a web.config appSetting
First you'll need to add a connection string as an appSetting variable in your web.config. In this sample I've added a connection to the Northwind db on my local machine:
<add key="northwind" value="Server=127.0.0.1;Database=northwind;User ID=northwind;Password=northwind;Trusted_Connection=False"/>

The next step is your report
To make umbracoStats use the northwind connectionstring, simply add the key in a "db" attribute to the query element (not case sensitive):
<QUERY db="northwind" />

This will make umbracoStats use the connnection string from your web.config with the appSetting matching the contents of the db attribute - in this case "northwind". So every report element of your report can come from different databases.

Finally you'll need to place your report file in the "/umbraco/plugins/stat/reports" folder. umbracoStats will automatically list your report on the dashboard and in the tree.

Download the full Northwind sample report here.

0 comment(s) for “Using external data with umbracoStats”

    Leave comment:


    (not shown)


    (optional - remember http://)


    (sorry, but I'm getting too much spam)