Showing posts with label Reporting Services. Show all posts
Showing posts with label Reporting Services. Show all posts

Wednesday, July 9, 2008

Customized VSTS/TFS Reporting Part IIb - Using the OLAP database

In my last article on this subject, I detailed how you could use the Report Wizard to create a simple report that detailed information about WorkItems, such as the number of state changes and revision summarized on a per project basis. The issue with that approach is that the information stored in the Data Warehouse is really designed to support the more efficient OLAP database for this type of reporting. In a future article on this subject I'll dig into the structure of the databases and discuss which one is used for a given purpose, but I wanted to take a moment and illustrate it here. Generally speaking, most of the customized reporting that deals with summarized data will come from the OLAP database as opposed to the data warehouse.

With this in mind, let's go ahead and construct the same report, but using the OLAP cube as a data source. If you still have your project open from the last exercise, you should have a screen that looks something like this:

image

To add a new report, right-click on the Reports folder and select Add New Report as shown below:

image

This will start the now familiar Report Wizard as shown here:

image

Click Next to bring up the Data Source panel. Create a new Shared Data Source as shown below:

image

Select "New Data Source", give it a name (I used TFSWarehouseOLAP) and select Microsoft SQL Server Analysis Services as the Type. Select Edit to get to the Data Source Connection Properties editor as shown below:

image

Type the name of your TFS Database server, choose the TfsWarehouse database, and select Test Connection to ensure that it all works. (Remember that this is an OLAP connection, so even though the name of the database is TfsWarehouse, you are not talking to the SQL Server database engine, you're talking to Analysis Services.) then choose OK. Select Next to move to the Query Designer screen as shown below.

image

On this screen you can either input a valid MDX query, or use the query builder to construct it for you. (Word of caution here, the Query Builder doesn't do the best job of creating MDX, as you might notice in a few screens) Choose the Query Builder button to load the MDX Query Builder as shown below:

image

This window is fairly straightforward to use if you've done any work with Analysis Services before, and very convoluted if you've never done so. Basically there are 4 main portions to this screen; The upper left details the cube structure as you can work with it. By default, it selects the first perspective (alphabetically) and displays the metadata contained within that perspective. In the case of the screen above, it's the Build Perspective and associated measures and dimensions. Since we are going to work with WorkItems (specifically WorkItem History) we will change the perspective. Click the ellipsis (...) next to the Build perspective in the upper left and then select Work Item History as shown below:

image

(By the way, a saavy ready might notice that the screen above tells you to select a "Cube" and I'm telling you to select a "Perspective" -- There is only 1 cube in the TfsWarehouse OLAP database, but there are multiple perspectives. You can think of a perspective as a logical view of a cube - and most simplistic tools like this treat them as the same thing)

Click OK to return to the Query Builder, but with the "correct" cube perspective selected this time as shown below:

image

The left hand side of this screen shows the structure of the Work Item History perspective. There are Measures, which provide the details of our analysis (these are the things that we can calculate and use), Key Performance Indicators (KPIs) which tell us if we're doing good or not, and Dimensions, which are the things that describe our analysis. The upper right-hand side is a filter area that allows us to filter information that will be provided in the result set, and the lower right hand side is essentially a pivot table, this is where we drop our measures and dimensions to build the analysis. To Start, open the Measures tree item and drop both Revision Count and State Change Count measures to the details area, then open the Team Project Dimension and drag the Project member to the pane just to the left of the measures. Then in the upper section, select the Team Project dimension and select all non-deleted projects in the filter expression as shown below:

image

Click on OK in the Filter expression dialog and OK in the Query builder to return to the Query string dialog as shown below:

image

(now you see what I mean about the MDX builder)

Click Next and select a Tabular report type (Normally we would use a Matrix report for OLAP data, but this is a simple example so we'll stick with simple report types) as shown below:

image

Select Next to bring up the table designer as shown below:

image

Move the Team_Project to the Group section, and the Revision Count and State Change Count fields to the Details section.

Select Next and choose your preferred report layout (I prefer block, but this is purely a personal preference)

image

Then choose the style that you will use (I prefer Corporate, but again, it's a personal choice)

image

Select Next to bring up the summary dialog

image

Name the report, and save it. This will return you to the Visual Studio window, where you can preview the report or make modifications to the layout (which you will need to do in this case if you followed my directions, because the columns will not quite be wide enough to support the fields)

And there we have it, a report that pretty much mimics the report we made in the last article. The point here is that we can use either the relational data warehouse or the OLAP cube to provide very meaningful information in a very short period of time. In the next article, I'll start digging in to the structure of the databases to help understand what data is available and how to use it.

Monday, July 7, 2008

Customized VSTS/TFS Reporting Part IIa - Using the Report Wizard

In my previous post on this topic, I discussed everything that you need on the client in order to develop customized reports for TFS. Now we'll walk through creating a very simple report that lists each Team Project that hasn't been deleted, and summarizes the WorkItems, state changes and revisons. This report can be used to get a quick snapshot of how active any given project is on your server. This report will use the relational database named TfsWarehouse on your TFS database server.

To begin the process of creating this simple report, start Visual Studio and create a new "Business Intelligence" project using the "Report Server Project Wizard" template as shown below:

image

Name the project and click OK. This will start the Report Design Wizard as shown below:

 

image

Click Next, and create a new Shared Data Source named "TFSWareHouseRelational" as shown below:

image

Click Edit to fill in the name of the SQL Server that hosts your TfsWarehouse database and other required connection information as shown below:

image

Make sure you test the connection and ensure that the server is available and operational. Click OK to close this screen and then click next to get to the query screen. For this screen, we're simply going to paste in the query shown below. (The query will make more sense in a later article where we did into the data warehouse schema for TFS)

SELECT

tp.[Team Project]

,SUM([Record Count]) AS [Total Work Items]

,SUM([Revision Count]) AS [Revisions]

,SUM([State Change Count]) AS [State Changes]

FROM [Work Item History] wih

JOIN [Team Project] tp

ON wih.[Team Project] = tp.__ID

WHERE tp.[Is Deleted] = 0

GROUP BY tp.[Team Project]

ORDER BY 1

 

Once you have the query in place, choose next and then choose a tabular report type as shown below:

image

Click next, and add Team_Project to the grouping, and the remaining fields to the detail as shown below:

 

image

Click Next and then choose the specific formatting you want. I personally prefer the Block layout with the Corporate style, but of course this is just a personal preference. These screens are shown below:

image

image

Once you have the style and layout selected, click next to take you to the deployment screen. Here you'll put the name of your SSRS Server and the folder that you want to deploy the reports to. In my case, I'm using my development instance of SSRS to deploy and test the reports so I just use Localhost as shown below:

image

Once this is specified, click Next to name the report as shown below:

image

Once you have named the report, click Finish to return to the Visual Studio development environment. This will open to the report designer with the design pane open as shown below:

image

If you want to see what your report will look like, click the Preview tab to see a report that looks something like this:

image

Obviously you'll want to play around with the layout of the columns and the colors to meet your requirements, but once you have the report looking the way you want it, you can choose DEPLOY from the BUILD menu to publish the report to SSRS. The report will then be available for use by users of TFS. (We'll discuss the deploying of reports to end-users in a future article)

This rather lengthy article demonstrated a very simplistic approach to creating a report to detail statistics for all Team Projects that are deployed to your TFS instance. In the next article I'll discuss using the wizard with the OLAP cube to detail more information about your TFS projects.

Friday, July 4, 2008

Clarification on Components needed for Reporting in TFS

It was brought to my attention that I left one pretty significant detail out of my previous post. You need to make sure that you have the appropriate licenses in place for SQL Server when you install the Management Studio Express Edition tools.

I certainly don't have enough knowledge around SQL Server licensing to be able to tell you what is right or what isn't, so just make sure you speak to whomever in your organization controls your product licenses to ensure that you are legal.

More information on SQL Server licensing can be found here: http://www.microsoft.com/sql/howtobuy/licensing.mspx

Thursday, May 15, 2008

SharePoint, SQL Server Reporting Services and Long-Running Reports

I have had the pleasure of working with SharePoint and SSRS in Integrated mode a LOT lately, both SQL 2K5 and Katmai. One thing that has been a troublesome annoyance is timeouts that occur for long-running reports. (Long-running in this context being defined as anything longer than 2 minutes) I have checked every setting in SharePoint that I could think of, set all data source timeout values that I could find, and even resorted to trying to restructure queries so that the reports could render in less than 2 minutes. (Thought about configuring snapshot execution as well, but even that doesn't help because the snapshot takes longer than 2 minutes to run and thus times out in SharePoint when trying to configure it)

In typical SharePoint fashion, when a report would time out, you'd get the basic EFAIL message which real doesn't tell you anything.

image

Well, after banging my head on the table for a good part of the day, and whining to my coworkers about how this thing just doesn't work, I came across the answer. Of course this was one of those answers that really bugged me when I found it...

Configuring SSRS Report Timeout in SharePoint

In Native mode, SSRS uses a default timeout of 9000 seconds (which if you do the math is 2.5 hours). In SharePoint integrated mode the timeout is reduced to 120 seconds (2 minutes). The timeout in SharePoint is actually related to the fact that reports are rendered using the http runtime. Any operation that is launched from within SharePoint (including Report Snapshot generation) using the httpRuntime object has to complete within the timeout parameters. If you plan on using SharePoint as a reporting services launching platform (i.e, you're using Integrated SSRS and you have your reports deployed to a report library) then you'll want to change the default. You do this by directly editing web.config for the application. (There is no GUI for this setting within SharePoint) The steps are as follows:

  1. Locate web.config for the SharePoint site you have configured for SSRS integration (in my case I used the default site, so the file is located at C:\inetpub\wwwroot\wss\VirtualDirectories\80)
  2. Open the file in an XML or text editor
  3. Look for "httpRuntime" (easiest thing to do is use the FIND functionality of your editor - ctrl F in most cases)
  4. Inside the tag, add executionTimeout="9000" (the end result will look like this: <httpRuntime maxRequestLength=”51200” executionTimeout=”9000” />)
  5. Close and save the file

  6. Reset IIS
  7. Run the report and notice that you don't get the EFAIL message shown above

Hopefully this helps alleviate some of the headache I had to go through. (And by the way, this is all documented in books online, it's just sort of buried)

Wednesday, October 10, 2007

SQL Server Reporting Services and SharePoint Integration video

The geekSpeak session that I did last month has been posted to Channel 9. You can view it here:

 

http://channel9.msdn.com/shows/geekSpeak

 

geekSpeak - SQL Server Reporting Service with Ted Malone

Listen in on this geekSpeak where expert Ted Malone shares his real-world experience implementing SQL Server Reporting Services and more.  His company Configuresoft has created a a product built out around all of Microsoft's BI and collaboration tools. 
Ted in an architect and developer who works with SharePoint, SQL Server Analysis Services, SQL Service Integration Services and, of course, SQL Server Reporting Services. 
Co-hosts Glen Gordon and G. Andrew Duthie get listener questions to Ted.  They also engage in a useful discussion of 'What is BI?'
Demos and discussion also includes the what, why, when and where of SharePoint and SQL Server Reporting services integration, data and collaborative tools all working together.  His talk also includes information about the BDC, or the Business Data Catalog.

Friday, September 14, 2007

The moment of "Duh"!

During my GeekSpeak session on Wednesday, I was asked to provide a high-level overview of Business Intelligence. I provided what I thought was a decent answer, had a couple of follow-on statements, and Glen chimed in with some info as well.. Sounds good, right???? Well, here it is Friday now, and i was just going through the MSDN SharePoint Forums on BI when it hit me, "Duh!" Why didn't you tout Lynn's book on the subject????

So, better late than never. Lynn Langit has written a fantastic business intelligence overview book.

Thursday, September 13, 2007

SharePoint 2007 "Farm" Sizing

Yesterday, during my GeekSpeak webcast (Which was fun by the way) the question came up as to how many SSRS instances could be supported per SharePoint farm. I kind of stumbled through the question and didn't have a very good answer, so I spent a little bit of time yesterday researching the topic. Unfortunately I don't have a much better answer to post here today, but one thing that comes to mind is that there is a clear statement from Microsoft that there should be 1 Database Server for every 8 Web Servers in a farm. (See the Microsoft SharePoint sizing recommendations here: http://technet2.microsoft.com/Office/en-us/library/6a13cd9f-4b44-40d6-85aa-c70a8e5c34fe1033.mspx?mfr=true )

So, using the ideas in the document above, and understanding that there can only be 1 SSRS instance for each Web Server, and "taking a bit off the top" for the overhead on the database server that an SSRS instance will generate, I'd say you should modify the recommendations slightly and say that you should limit SSRS integration to 5 instances of SSRS per Database Server in the farm. (This is in no way an official limitation, it's simply conservative extrapolation on my part)

Sunday, July 29, 2007

Geek Speak on MSDN

I will be the guest speaker on the Microsoft Developer Network (MSDN) geekSpeak series on September 12!

I'll be speaking on the integration of SQL Server Reporting Services and SharePoint 2007.

Check it out!

Wednesday, June 13, 2007

How did I miss this?

Seems like Microsoft has purchased the intellectual property behind SoftArtisans Officewriter product. If you've never used Officewriter, you may wonder what the big deal is, however if you've used it, you know that it really does make authoring SSRS reports easier. Now it would appear Microsoft is going to bring that technology in house and fold it into a future release of SSRS.

This will be really big news for the "self service" business intelligence community!!

Full details are found here: http://www.microsoft.com/presspass/press/2007/may07/05-09BINewDayPR.mspx

Monday, June 11, 2007

Integrating SSRS with SharePoint whitepaper

Microsoft has published a WhitePaper on the integration of SSRS and SharePoint in SQL Server 2005 SP2. (There are a few other things included in this whitepaper as well)

Check it out here.