SharePoint List Query Filter
I am writting an SSRS report where I am querying a SharePoint list and trying to filter the data through the CAML query. In BIDS, the query returns data, but the filter where clause doesn't seem to be getting recognized as I get all of the
data back. The where clause does seems to work in the U2U CAML Query Builder tool.
Can anyone please give advice as to why my where clause isn't working?
http://<<servername>>/BI/_vti_bin/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>Subscribe - Sales by Product Group - Wheel</DefaultValue>
</Parameter>
</Parameters>
</Method>
<Where><Eq><FieldRef Name="RunDateNew" /><Value IncludeTimeValue="FALSE" Type="DateTime">2010-09-27</Value></Eq></Where>
<ElementPath IgnoreNamespaces="True">*</ElementPath>
</Query>
September 27th, 2010 7:54pm
You create another parameter as such:
<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>Subscribe - Sales by Product Group - Wheel</DefaultValue>
</Parameter>
<Parameter Name="query" Type="xml">
<DefaultValue>
<Query>
<Where>
<Eq>
<FieldRef Name="RunDateNew"/>
<Value IncludeTimeValue="FALSE" Type="DateTime">2010-09-27</Value>
</Eq>
</Where>
</Query>
</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="True">*</ElementPath>
</Query>
Free Windows Admin Tool Kit Click here and download it now
September 27th, 2010 11:06pm
Hi Leo,
There is similar thread for your reference:
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/c131321c-8518-4c14-a941-7bccb78f591e/
Thanks,
Jin ChenJin Chen - MSFT
September 29th, 2010 12:49pm