Retrieving SharePoint list data from SSRS report
Hi, I am working on creating an SSRS report which pulls data from a SharePoint list using the query as shown below: <Query> <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction> <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name = "GetListItems"> <Parameters> <Parameter Name="listName"> <DefaultValue>Order Requisition</DefaultValue> </Parameter> <Parameter Name="viewName"> <DefaultValue>906E4343-6018-4071-AB41-CEEFF0A92E92</DefaultValue> </Parameter> <Parameter Name="query" Type="xml"> <DefaultValue> <Query> <Where> <Eq> <FieldRef Name='Approval_x0020_Status'/> <Value Type='Text'>Approved</Value> </Eq> </Where> </Query> </DefaultValue> </Parameter> <Parameter Name="queryOptions" Type="xml"> <DefaultValue> <QueryOptions> <IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns> <DateInUtc>False</DateInUtc> </QueryOptions> </DefaultValue> </Parameter> </Parameters> </Method> <ElementPath IgnoreNamespaces="True">*</ElementPath> </Query> The above query works fine and I am able to retrieve the data fields. However, it retrieves all the fields specified in the view. Is it possible to specify only the fields that are required in the XML query for the purpose of reporting without depending on the view? I would like to do in that way mainly for the following reasons: 1. Retrieve only the data that is required instead of getting all other columns that are not required for the purpose of performance reason. 2. Do not depend on the columns defined in the view. If a field that is defined in the view is used in report and later if the field is removed from the view, I do not want the query to fail. Is there a way to define the XML query that satisfies the above requirements when getting the SharePoint list data using the Web service in SSRS reports? We are using SQL Server 2008 Standard Edition and MOSS 2007. Regards, Raghu
July 2nd, 2011 10:01am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics