2

A customer is trying to build a report using Report Builder 3.0 against a SharePoint list. He’s trying to include items in subfolders. For ex. by using CAML (i.e. in this context, SharePoint’s query language) you accomplish this by specifying <ViewAttributes Scope=”Recursive”/>: result set contains items in subfolders.

So, how can you specify same thing in a report? I cannot find the correct syntax to do that, neither by directly querying the list:

<RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ListName>testlist</ListName>
  <ViewFields>
    <FieldRef Name="LinkTitleNoMenu" />
    <FieldRef Name="Author" />
  </ViewFields>
</RSSharePointList>

nor the list web service (lists.asmx):

<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>testlist</DefaultValue>
             </Parameter>
             <Parameter Name="rowLimit">
                <DefaultValue>1000</DefaultValue>
             </Parameter>
          </Parameters>
        </Method>
        <ElementPath IgnoreNamespaces="True">*</ElementPath>
</Query>

Tried to insert it as a parameter for the query, like

     <Parameter Name="viewAttributes">
        <DefaultValue><ViewAttributes Scope="Recursive"/></DefaultValue>
     </Parameter>

but with no luck (yet).

Pointers, appreciated. Thanks in advance.

Ariel
  • 5,752
  • 5
  • 49
  • 59

1 Answers1

1

Found the thing...

<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>testlist</DefaultValue>
             </Parameter>
             <Parameter Name="rowLimit">
                <DefaultValue>1000</DefaultValue>
             </Parameter>

   <Parameter Name="queryOptions" Type="xml">     
    <DefaultValue>
     <QueryOptions>
      <ViewAttributes Scope="Recursive" />
     </QueryOptions>
    </DefaultValue>
   </Parameter>

          </Parameters>
        </Method>
        <ElementPath IgnoreNamespaces="True">*</ElementPath>
</Query>
Ariel
  • 5,752
  • 5
  • 49
  • 59