SSRS SharePoint List
Hi All,
I use the following code to create a dataset.
<Query>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListCollection" />
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListCollection</SoapAction>
</Query>
I then used the following code to pull lists from SharePoint. The default value that I used "{2710E4CD-A8F5-4465-9366-62D8362F61FC}" below is the value obtained form the above dataset.
<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>{2710E4CD-A8F5-4465-9366-62D8362F61FC}
</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="True">*</ElementPath>
</Query>
My question is, how do I know which list to pull in? Is there a way to know which one is a user defined list? How do I interpret the results of the first dataset? Any help would be truly appreciated. Thanks in advance.
October 30th, 2010 7:16pm
Hi Sam1980,
The first dataset will return the list of all lists in the specified SharePoint site. The dataset contains many fields, for example, ID, Title, and so on. We can use the Title field to determine what is the list.
In order to pass a list ID from dataset1 to dataset2, we can follow these steps:
Create a parameter in the report. Set the Available Value for this parameter to get from dataset1. The Value field is ID, and the Name field is Title.
Double-click the second dataset, go the "Parameter" tab, set the "Parameter Name" to be "listName", and the "Parameter Value" to be the parameter we defined in step1.
Now, we are able to pass a selected list to the dataset2 dynamically.
For the question "Is there a way to know which one is a user defined list", it is SharePoint question, I would suggest you re-posting it in SharePoint forum. Just based on my option, it might be able to determine if it is a user defined list through the
returned field.
Could you please describe a bit more about "How do I interpret the results of the first dataset?"? If you just want to show the returned dataset in the report, please use the Tablix control to show it.
If you have any more questions, please feel free to ask.
Thanks,
Jin ChenJin Chen - MSFT
Free Windows Admin Tool Kit Click here and download it now
November 2nd, 2010 6:02am