We are constantly getting requests to produce reports that include data from SharePoint lists. We have just started using SQL Server Reporting Services (SSRS) 2008 R2 and see that there is a new Microsoft SQL Server Reporting Services SharePoint List Data Extension. Can you provide an example of how this works?
The Microsoft SQL Server Reporting Services SharePoint List Data Extension that comes with SSRS 2008 R2 allows you to specify a SharePoint site or subsite as a Data Source, then create a Dataset that is based on a SharePoint list in that site or subsite. This new data extension allows you to access list data in SharePoint Foundation 2010, SharePoint Server 2010, Windows SharePoint Services 3.0, and Office SharePoint Server 2007 sites.
In this tip I will review the following steps required to develop a report that retrieves data from a SharePoint list:
Create a Data Source
Create a Dataset
Layout the report
To begin create a new Report Server project using SQL Server Business Intelligence Development Studio (BIDS) that comes with SQL Server 2008 R2. Note that the SharePoint List Data Extension is a new feature with SQL Server 2008 R2; it is not available in prior versions of SQL Server. Add a report to the project. You should see the Report Data tree view with a Data Sources and Datasets node (in addition to the other nodes) as shown below:
Create a Data Source
When building a report that uses data in a SharePoint list, the Data Source Connection String property must be set to the URL of the SharePoint site or subsite that contains the list you want to use in your report. Right click on the Data Sources node in Report Data and select Add Data Source from the popup menu. Fill in the Data Source Properties General tab as shown below (specify the URL in the Connection string for your SharePoint site or subsite):
Click on Credentials and fill in the dialog as shown below:
Create a Dataset
Once you have a Data Source that points to the URL of a SharePoint site or subsite, the next step is to create a Dataset based on the Data Source. Right click on Datasets in Report Data and select Add Dataset from the popup menu. Fill in the dialog as shown below (select the Data Source created above):
Click on the Query Designer button to display the SharePoint lists in the SharePoint site specified in the Data Source. Select a list and some fields from the list as shown below (I chose an Announcements list):
Note that you can only select fields from one list. Click OK and you will be returned to the Dataset Properties dialog which is now complete:
The Query is displayed as XML and it shows the name of the list and the fields selected.
Layout the Report
The last step is to add a Table to the report designer from the Toolbox and drag/drop fields from the dataset to the table. The report layout is shown below with the fields selected from the Announcements list:
Click Preview to show the report in the designer:
You can also use Shared Data Sources and Shared Datasets, which allow multiple reports to use these items.
Generating a report from 2 different XLS files in a SharePoint list - I can't thnik of an easy way to do this. Maybe you could combine the XLS files into a single XLS file, import the combined XLS file into a custom list, then run your report based on what I did in this tip.
A better approach might be to import the XLS files into tables in a SQL Server database then report from it.
Integration Services project is not a report; it's something you use to retrieve data from various data sources, transform the data, and store the data in a different place. This is typically called ETL - extract, transform and load. It is used in data warehousing applications.
Thursday, November 28, 2013 - 1:43:50 AM - Avahita
I'm confused about difference netween "integration service project" and "report server project". your comment about "integration service project " (Advanced Editor; try setting IncludeFolders to True and possibly also IsRecursive to True.)
◦this query results all items in folders of list in preview tab but when my report upload to sharepoint report library in sharepoint site result only folders and items in root folder of list 4.upload the report to report library in sharepoint site.
Wednesday, November 27, 2013 - 2:36:39 PM - Raymond Barley
How to retrieve all items from all folder in a list? because my report return all data in root folder only. that is very strange !!! my report in designer in vs2008 retrive all items without folder but when i upload in my report library in sharepoint site retrive items in folders.
Tuesday, July 02, 2013 - 8:24:23 AM - Bob Armstrong
I did a tip a while back showing how to call a SharePoint web service by using a SQL Server CLR function. With CLR you can write .NET code then create SQL Server functions, stored proc, triggers, etc. that execute your .NET code. The example doesn't do what you want, it's based on SharePoint 2007, but the concept will work. You have to figure out how to get what you want using the SharePoint web service (I think the Lists web service is what you want - see http://msdn.microsoft.com/en-us/library/lists(v=office.12).aspx)
Monday, July 01, 2013 - 6:29:49 AM - Bob Armstrong
If you're saying you get no data when you run the report after you've deployed it, that may be a security issue; i.e. the deployed report isn't using the credentials of the caller, or you need kerberos, or something else. A simple way to test is to use stored credentials in the connection and see if that solves the problem.
Take a look here in the credentials section: http://msdn.microsoft.com/en-us/library/ee633650.aspx
Wednesday, April 10, 2013 - 4:48:54 PM - george hardy
well, that may not be it after all. i build the query, pulling the document name, version, modified date, etc.....in the query editor, it pulls the info from the library fine when i click "run Query", but going info run report, the fields are all blank. man, i wish MS would have just bought crystal reports :S
Wednesday, April 10, 2013 - 4:17:34 PM - Raymond Barley
I'm wondering if you can offer some suggestions on the best (better) tools to use to generate a Calendar View (Weeks and Days) simliar to Outlook from data in SQL Server. Reporting Services? SilverLight? Any other suggestions?
Wednesday, December 05, 2012 - 2:00:04 PM - Ray Barley
I can think of two possibilities. First maybe you can create a view on the SharePoint list; the view would only include the date range that you want. Second when you set the properties for the SharePoint List Source component you can specify a CAML query.
I have tried accessing Calendar list from SharePoint as data source into SSRS report. I was unable to get previous years items, like if start date is 2011 i was not getting the item in the datasource on the SSRS report. Is there any way we could include items with start date as previous year. Thanks Ray.
Thursday, November 29, 2012 - 9:27:01 AM - Ray Barley
When you create the data source you specify the URL of the web site that has the calendar you want. When you specify the dataset you will find the calendar in the in the list on the left hand side of the query designer. Look at the screenshot above and you'll see an entry for BI Team Calendar.
Appreciate the response I understand there is the ability to write your own DPE however I am not a full on developer and don't have the time to spend developing something which you would think someone would have put into CodePlex by now.
Saturday, September 18, 2010 - 8:35:00 AM - Ray Barley
You can write .NET code and use the SharePoint Lists web service which will allow you to do just about anything with a list. There is a GetListItems method that returns items from the list based on your query parameters. You then would implement your own Data Processing Extension in Reporting Services. I've never done a Data Processing Extension so I don't know what kind of level of effort is involved.
I think this approach is essentially what is provided in Reporting Services 2008 R2.
Friday, September 17, 2010 - 4:54:23 PM - Pobblebonk