Skip to main content

Consuming SharePoint 2010 Lists Data in the SSRS 2008 R2 Reports

Step 1: Ensure that you have a SharePoint List.
In this demo, we will report against SharePoint Products List.
Step 2: Understand the SharePoint List Web Service Interface.
SharePoint has a lists.asmx web service which provides interface to download the SharePoint lists data in the non-SharePoint systems. You can access the SharePoint list web service using the http://siteurl/_vti_bin/lists.asmx. You can use the GetListItems method which returns dataset to download all the list items for the specific list.
Step 3: Create new Shared Data Source and Report Server Project
Create a new Report Server Project in the Business Intelligence Development Studio (BIDS). First step of configuring the SSRS report is creating the new shared data source. Select the SharePoint List as a data source type and specify the SharePoint Site URL hosting the lists for the connection string.
On the credentials tab, specify either windows authentication or no authentication if anonymous authentication is enabled on the SharePoint Site. Please do no select any other options. None of the other options would work for the SharePoint List Web Service.
Step 4: Create a new Report.
Next steps would be creating the report specific data source and data set to configure the data for the report. Make sure Report Data pane is available in the designer.
Step 5: Create a new Report Data Source.
Using the Report Data pane, create the new report data source. Specify the Shared Data Source as a report data source.
Step 6: Create a new Report Data Set.
Using the Report Data pane, create the new data set. Specify the Report Data Source as a data source. New Query designer support for the SharePoint Lists as a data source, allows the developers (from the BIDS tool) or end users (from the Report Builder tool), browse through the SharePoint lists, select the specific list, and define the filters and parameters without knowing detailed SOAP or CAML query language. As stated earlier, one of biggest limitations of this approach is SharePoint Lists as a data source doesn’t support selecting data from the multiple lists. One way you can avoid joining multiple lists is define the list relationships and bring the additional fields along with lookup column. For more complex joins, you can create the custom web service. Custom web service requires XML as a data source and specify the SOAP command to retrieve the data from the SharePoint Web Service in the query designer.
Here is the sample Query to access the web service through the SharePoint SSRS data interface
<RSSharePointList xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema“>
  <ListName>Product</ListName>
  <ViewFields>
    <FieldRef Name=”Title” />
    <FieldRef Name=”Product_x0020_Line” />
    <FieldRef Name=”Product_x0020_Description” />
  </ViewFields>
  <Query>
    <Where>
      <Contains>
        <FieldRef Name=”Title” />
        <Value Type=”Text”>
          <Parameter Name=”Title” />
        </Value>
      </Contains>
    </Where>
  </Query>
</RSSharePointList>
Step 7: Validate the fields returned by the Data Set
In the Query designer, you can verify if query is valid and returns the fields.

Optionally, you can click on the fields tab on the data set to see if query returns the data fields contained by the data set.
Step 8: Design the Report and Preview the Report in BIDS
Once you have properly configured the data source, data set, and fields, you can design the report by dragging and dropping the fields on the report designer. In this scenario, we will create a simple tabular report and preview the report to make sure reports renders fine in the BIDS before publishing to the SharePoint.
Step 9: Deploy the Report to the SharePoint
You can use the BIDS or upload the RDL files to the SharePoint Document Libraries directly.
Step 10: Verify the SSRS Report in the SharePoint
You can use Report Viewer or Report Explorer web parts if SSRS is installed in the native mode to consume the SSRS reports in the SharePoint. Alternatively, you can use the SharePoint SSRS integrated mode to create and consume SSRS reports more collaboratively by enabling the SSRS report content types in the document libraries. In this scenario, we have SharePoint Integrated environment and SharePoint document library is enabled to host the SSRS reports.

Comments

Popular posts from this blog

Site Logo Not Changing on Web Part Pages

I tested and reproduced your issue in my local machine. Since the Web Part Pages would override the content in PlaceHolderPageTitleInTitleArea place holder, the site logo would not change automatically. So would you please try remove or comment the following control TitleBarWebPart: See the similar scenario and solution: http://emanonsolutions.blogspot.com/2010/02/left-navigation-webpart-pages.html Hope this can help.

Create a Custom Site Definition with Additional Content in SharePoint 2010 Using Visual Studio 2010

·          Web Templates ·          Site Definitions and Configurations ·          Deciding Between Custom Web Templates and Custom Site Definitions ·          Understanding Onet.xml Files ·          How to: Create a Custom Web Template ·          Overview of Creating Custom Site Definitions Site Template Configurator utility http://stefan-stanev-sharepoint-blog.blogspot.com/search/label/SharePoint%202010 Create a Custom Site Definition with Additional Content in SharePoint 2010 Using Visual Studio 2010 http://community.bamboosolutions.com/blogs/sharepoint-2010/archive/2010/11/11/sharepoint-2010-cookbook-how-to-create-a-custom-site-definition-with-additional-content-in-sharepoint-2010-using-visual-studio-2010.aspx http://blogs.msdn.com/b/allenwang/...

SPFx Fantastic 40 Web Parts

SPFx Fantastic 40 Web Parts Ref Link :  https://github.com/OlivierCC/spfx-40-fantastics Menu & Carousels & News Management Overview Web Part Description News Carousel Insert a classical, responsive, cool & touch ready News Carousel. With this web part, you can add easily news focus in your SharePoint site. The users can easily navigate in news items, with buttons or with touch. Tiles Menu This Web Part allows you to very easily create a menu in form of tiles that is responsive and adapted for mobile. You can directly manage the items on your menu, with a title, an image and manage Visual rendering options. 3D Carousel Insert a 3D Carousel in your SharePoint pages. With this Web Part, you can manage your menu items and create automatically a 3D carousel. Coverflow Generates a Coverflow Apple like menu in your pages. Manage your menu items with title and picture and create a cool coverflow menu. News Slider Insert a News Slider Tiles control to your pages....