I have a requirement to create report from multiple list. I was wondering if there is any out of the box features in SharePoint which will let you do that or do i have to create a custom webpart with code.
please see the below CAML query using one of the caml query generator with CSOM. with this i can only get the details of one list "Printers Consumable Requests". How do i modify it so that i can have a left join two other lists with columns of it?
ClientContext clientContext = new ClientContext("your site");
Microsoft.SharePoint.Client.List spList = clientContext.Web.Lists.GetByTitle("Printers Consumable Requests");
clientContext.Load(spList);
clientContext.ExecuteQuery();
if (spList != null && spList.ItemCount > 0)
{
Microsoft.SharePoint.Client.CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml =
@"<View>
<Query>
<Where><And><Eq><FieldRef Name='OutDateYear' /><Value Type='Calculated'>2017</Value></Eq><Eq><FieldRef Name='OutDateMonth' /><Value Type='Calculated'>01</Value></Eq></And></Where>
</Query>
<ViewFields><FieldRef Name='OutToPrinterID' /><FieldRef Name='OutDate' /><FieldRef Name='PartID' /></ViewFields>
</View>";
ListItemCollection listItems = spList.GetItems(camlQuery);
clientContext.Load(listItems);
clientContext.ExecuteQuery();
}