How To Display Documents From Different Libraries Using DataView
The content query webpart (CQWP) is usually used for content rollup across a site collection and it is very powerful, but it is not easy to customize and style. Using a dataform webpart with some tweaking can do the trick (and you have to use SharePoint Designer 2010 to do that).
A blog article titled SPDataSource and Rollups with the Data View is the starting point here. You basically edit the data source in source mode to enable cross list fetching of items and specify what kind of list you want to include. Lists (and libraries) have something called ServerTemplate id or value and you can find these here. A document library has value = 101.
So, here’s how we start: add a web part page and insert an empty data view (insert – data view – empty data view). Click to add source and select a document library. In this case, I selected Shared Documents in a team site (and I also have a blank site under it with another document library called blankdocs). Then, inserted the datasource selected fields as multiple item view. I added a filter (from options) to include items with title that contains the word “Policy” and also selected which fields to show and items per page (all items).
Now, switch to source mode and find the datasource tag (if you had the view selected, you get the corresponding source highlighted). You need to change DataSourceMode=”List” to DataSourceMode=”CrossList” and in the selectcommand add <Webs Scope="Recursive"></Webs><Lists ServerTemplate="101"></Lists> inside the