1

I'm using SQL Server Report Builder to migrate an old report from MOSS 2007 to SharePoint Server 2016, and, in this report there are 3 data sets. I've changed out the view GUIDs to the new values they received from migrating them to 2016, however, this one data set does not respect or care about the ViewFields parameters.

Here is the code:

<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>Orders List</DefaultValue>
   </Parameter>
   <Parameter Name="viewName">
    <DefaultValue>33838045-B74C-47C7-B876-AB23D66DA401</DefaultValue>
   </Parameter>
   <Parameter Name="viewFields" Type="xml">
    <DefaultValue>
     <ViewFields>
      <FieldRef Name='Program'/>
      <FieldRef Name='Project'/>
      <FieldRef Name='Name'/>
      <FieldRef Name='Created'/>
      <FieldRef Name='Created_x0020_Date'/>
      <FieldRef Name='Product_x0020_Number'/>
      <FieldRef Name='Product'/>
      <FieldRef Name='Quantity'/>
      <FieldRef Name='Units'/>
      <FieldRef Name='Price'/>
      <FieldRef Name='Percentage'/>
     </ViewFields>
    </DefaultValue>
   </Parameter>
   <Parameter Name="rowLimit">
    <DefaultValue>100000</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>

When I click "Run Query", I only get all of the default properties, like the xmlns, s, dt, rs, z, ItemCount, etc, but I don't actually get any of the other properties specified in the viewFields. I've checked that the field names are the internal handles and I've even made it simple and just only tried testing them one at a time. They just don't come back in the result set. Could it be because the list has over 5000 items in it?

If I modify another data set and try to manipulate the output using ViewFields I can correctly get it to show different columns from the list. Just not with this one. Is there something simple I'm missing?

0

Turns out, I had to use the GUID from a View that was not grouping the items by a column. This was the fix for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.