Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We are currently designing a where there are many sites, each site contains a list.

The list in each of these sites has the same fields.

We would like to create a report based on the information in these lists.

Is there a built in way to extract this information? Or do we just have to loop through each site and pull it out?

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

If all your sites are in the one site collection, and you can use the SPSiteDataQuery object. It helps if you have a particular content type to query for.

Also, if you've got the publishing features enabled on your site collection, you can use the content query web part. Internally this uses the SPSiteDataQuery class, but it gives you a user interface too.

share|improve this answer
    
Thanks that fits very well with what we are trying to do. –  Shiraz Bhaiji Dec 9 '10 at 8:50
    
It's not recent, but this might be useful: novolocus.com/2008/07/17/… –  Andy Burns Dec 10 '10 at 15:35
add comment

SharePoint does not allow to use the SPSiteDataQuery over different site collections at the same time. Plus you need the same content type or list template.

If you want to aggregate over different site collections, you need to do it yourself with the foreach approach.

Another option is to install the Search Server and perform a Search Query. The advantage is that queries will be faster. The drawback is that data are not onlive (there is a delay caused by the indexation)

share|improve this answer
add comment

If they are within the same site collection, you could use a Content Query web part to aggregate all the data or use a tool like the Lightning Conductor web part from Lightning Tools.

share|improve this answer
    
The Lightning Conductor web part goes beyond the site collection barrier and will allow you to get data from several site collections at once. Thought I should clarify that. –  PirateEric Dec 14 '10 at 13:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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