2012-08-13 53 views
2

客戶正在嘗試使用Report Builder 3.0針對SharePoint列表構建報表。他正在嘗試將項目包含在子文件夾中。例如。通過使用CAML(即在此上下文中,SharePoint的查詢語言),您可以通過指定<ViewAttributes Scope=」Recursive」/>來完成此操作:結果集包含子文件夾中的項目。SSRS:如何根據SharePoint列表創建報表時指定ViewAttributes

那麼,如何在報告中指定相同的東西呢?

<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> 

也不名單Web服務(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> 

試圖插入它作爲一個參數查詢,如

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

但沒有運氣(還)。

指針,讚賞。提前致謝。

回答

1

找到的東西......

<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> 
相關問題