viernes, 7 de septiembre de 2012

Save SharePoint DataView WebPart Roll Up Grouping

There's already plenty of blogs explaining how to create a data view web part that rolls up information across lists from a site collection so I won't be going into detail about that, you can however look up on these blogs for information on that:

http://zioed.wordpress.com/2011/10/24/using-a-data-view-web-part-to-create-a-cross-site-lists-rollup-view-office-365-sharepoint-online-and-sharepoint-2010/

http://blog.metrostarsystems.com/2011/10/03/jennys-sharepoint-tip-rollup-items-across-a-site-collection-by-creating-a-cross-list-data-view-web-part/

Writting this mostly as a self note, when you create a Roll Up dvwp, you need to be aware that any custom filtering, grouping, and headers that would change the xlst or parameters of the structure of the table, need to be set from Sharepoint Designer, such as Design -> Options -> Grouping toolbar.

After saving the results of these changes you can export your webpart to a site gallery or to a file, and add it to any normal sharepoint page, or just redirect to your custom site page.

Saving to gallery lets you add this webpart inside a webpart zone of a non site page without having to bother with SPD, and more over, to include this in a site template or to insert it in several sites, so you can re-use the code without doing it from scratch.

If you try to set group headers or filtering after, you won't see very good results.