Report Builder 3.0 - Query SharePoint List/Library Folder Structure
I need to create a report in SharePoint based on the main library/list which holds all the folders/reports (.rdls). The idea is to create a report to monitor the file structure to see which users are creating reports. I have created a DataSource that is the SharePoint site and using the Microsoft SharePoint List as the data provider. When I go to create a DataSet then using the aforementioned DataSource, in the Visual Query Designer, all I see are all of the lists on the site; I do not see a way to define which view to use for a particular list. I have scoured the web looking for a way to define the view to use in a SharePoint List query. I have tried all manner of tweaking the following: <RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ListName>Reports</ListName> <Query> <Parameters> <Parameter Name="viewName"> <DefaultValue>MyViewName</DefaultValue> </Parameter> </Parameters> <ViewFields> <FieldRef Name="ContentType" /> <FieldRef Name="Title" /> <FieldRef Name="Created" /> <FieldRef Name="Author" /> <FieldRef Name="Modified" /> <FieldRef Name="Editor" /> </ViewFields> </Query> </RSSharePointList> I also find that with the <Query> tags in place, the <ViewFields> definition is ignored and it displays ALL fields regardless. That's less of a problem as I can clearly hide unwanted fields on the front-end. Anyway, with the default view, the only thing the query returns are the top-level parent folders. I need to show all items. Please let me know if you need any more info. I have a report. My DataSource is a SharePoint List. The SharePoint List is the main directory for Reports on our SharePoint site. I need to create a report that will show all items in said list. However, since the default view maintains a folder structure, I have created another view that shows all items in a flat structure. In any case, please help!
March 18th, 2011 4:27pm

Hi, Check the below link. http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/7ec5 Regards, PS
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2011 1:19am

Hi mghtbgiant, please check this thread http://social.msdn.microsoft.com/Forums/en/sqlreportingservices/thread/dbb794c3-ea71-4571-bee5-391e57150d9b to see if it works for you. thanks, Jerry
March 21st, 2011 5:14am

broken link
Free Windows Admin Tool Kit Click here and download it now
March 28th, 2011 9:20pm

Shouldn't I be the one to select whether something is a solution or not? I have been through that thread, among others; none of which are a solution. I mentioned that I had seen syntax similar to the thread posted in my original post. I am still unable to get anything working where I Here is the original syntax for a query I'm working on presently. I need to be able to specify the view, NOT use the default. <RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ListName>MyListName</ListName> <ViewFields> <FieldRef Name="Field1" /> <FieldRef Name="Field2" /> <FieldRef Name="Field3" /> <FieldRef Name="Field4" /> <FieldRef Name="Field5" /> </ViewFields> </RSSharePointList> It's quite possible I'm missing something as I'm relatively new to this interface. I guess I left out that I'm working with Report Builder 3.0 in SharePoint 2010. The query syntax is apparently different now than it was in SSRS 2005 which is to what that thread refers. The <RSSSharePointList> is the required parent node, and <ListName> is a required element as well. I would love for there to be a <ViewName> element after <ListName> or a ViewName property on the <ListName> element. Whichever. The point is, the aforementioned is not a solution.
March 28th, 2011 9:29pm

It appears that the <ViewFields> element needs to be outside of the <Query> element, or in other words, be directly a child of the <RSSharePointList> element. I haven't dug up the schema definition for RSSharePointList, but basically saw that putting under the query element isn't a validation error... but doesn't accomplish what you want. The XML needs to look like: <RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ListName>Reports</ListName> <Query> <Parameters> <Parameter Name="viewName"> <DefaultValue>MyViewName</DefaultValue> </Parameter> </Parameters> </Query> <ViewFields> <FieldRef Name="ContentType" /> <FieldRef Name="Title" /> <FieldRef Name="Created" /> <FieldRef Name="Author" /> <FieldRef Name="Modified" /> <FieldRef Name="Editor" /> </ViewFields> </RSSharePointList> Wasn't able to discover any user interface support for this, just editing the XML directly. Adding a 'parameter' from the dataset design screens with viewName = MyViewName didn't update the XML for me.
Free Windows Admin Tool Kit Click here and download it now
April 16th, 2011 2:45am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics