Data View Web Part Q&A
This question arrived this morning from Robert:
“Session 1 of your DVWP Series sounds like it might solve a problem we have. Namely, we need some way to display an aggregate list of all (printable) form documents at the top site level that includes in that list all (printable) form documents stored in document libraries of various subsites.
Question: How far would Session 1 address this need we have?”
Hi Robert,
There may be a couple of ways to accomplish what you need in your scenario, but the “List Relationships” is not one of them, unfortunately.
Here’s a blog post I’ve written about how to do a “roll up” web part. Unfortunately, I haven’t ever been successful in working with document libraries with the roll up. I can get it to list all the documents, but haven’t been able to create the hyperlink to open each one.
Also, there’s a way you could create a linked source to merge multiple document libraries, but this wouldn’t be automatic, and you’d have to modify the data view web part each time a document library was added. Here’s a screencast that I’ve done on that concept:
Thanks for the inquiry!
The following should work for generating a link to a document in a DVWP roll up for document libraries:
Hi,
You wrote a lot on DVWP. It’s true that it’s an intersting functionnality to use.
Is it possible to package a customization inside a solution file ?
It’s the missing piece to really use DVWP.
Thanks,
Charles
Hmmm, not sure, I’ll see if I can get a developer to answer that one, since I’m not one.
Yeah, Laura… keep saying that. — Mark
I agree with Charles … The Sharepoint projects I’m working on are all code based using Visual Studio and packaged as solutions … My 1st idea would be to deploy the VS solution to a dev server, open the dev version in Sharepoint Designer & apply DVWP techniques taught here, Export the customized DVWP to your local file system (They will still be associated to the GUID that you’ve created for your solution’s lists) & then copy them to your VS project.
Is this the best or most common way? Interested in suggestions.
The best way I have found to do this is first to remove any hard coded ListId’s from from the DVWP and replace with ListName. (See Marc’s post for more info on this). This will make them more reusable…
Next export the DVWP off the page (Wictor has a post on this) which will give you a .webpart file.
Lastly add this to your Visual Studio project (sorry aboutt the code talk Mark) and deploy it to the Web Part gallery using a feature. (MSDN example here). Something like this will work:
<Module Name=”WebParts” List=”113″ Url=”_catalogs/wp” Path=”WebParts” RootWebOnly=”True”>
<File Url=”Exported_DVWP.webpart” Type=”GhostableInLibrary”>
<Property Name=”Group” Value=”Exported DVWP” />
</File>
</Module>
Dear Ms. Rogers
I have a question on using Data View for displaying Tasks in several Share Point sites. Suppose that there are 3 Share Point sites namely A, B and C in which Tasks are allocated to Team Member 1 and Team Member 2. As I enter a Web Page and use Data View, the Tasks for all the three sites are observed. I wish to know how one could enter the Web Page with his own access and observe only his own Tasks. I would appreciate if you could help me in this regard.
Best Regards,
Ali Shahba
Ali,
Are you using the enterprise version of SharePoint? If so, you can use the out-of-box web part called “User Tasks”
Dear Ms. Rogers
Firstly I deeply appreciate your help. Using User Task Web Part, the Tasks of the user in only one Share Point site are observed. I wish to have the Tasks of the user in all Shape Point sites in a single place such as Task Page so that the user would not visit all the Share Point sites to learn about his Tasks. Using Data View, I could gather all Tasks in a single place. The problem is now filtering on the basis of the users where the following String is displayed. Do you have any idea in this regard?
Best Regards,
Ali Shahba