I am creating an SSRS report based on a SharePoint 2016 list using the following query:
<RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ListName>Applications</ListName> <ViewFields> <FieldRef Name="Title" /> <FieldRef Name="SME" /> <FieldRef Name="Last_x0020_Checked_x0020_Date" /> <FieldRef Name="Status" /> </ViewFields> <Query> <Where> <Eq> <FieldRef Name="Status" /> <Value Type="Text">In Use</Value> </Eq> </Where> </Query> </RSSharePointList>
The query and report are returning the proper data, but I need to add one feature. The SME field is a lookup field. In my query, I only need to return the first value of the SME field. Is there any way in CAML to limit that field to only the first value? IF not, is there some other way I could achieve what I need?