Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Data View Web Part and Data Sources

  Asked By: Marilyn    Date: Nov 29    Category: Sharepoint    Views: 2725

I'm trying to use a Data View Web Part in order to roll up data from 2 separate
libraries/lists that live in seperate sites as shown below:

1) Site Description List in "Product A Site" - (column: Product Name)
2) Contracts Library in "Admin Site" - (columns: Product Name, Vendor, Title)

The DVWP resides in "Product A" and must only list "Contracts" where the "Site
Description Product Name" column (in Product A Site) matches the "Contracts
Library Product Name" column (in Admin Site).

I accomplished this using Sharepoint Designer by linking both libraries (data
sources) and then adding a filter in the DVWP where both Product Name columns
match. Everything works great.

My problem is I saved out the "Product A Site" as a site template and created a
new Product Site (Product B Site) based off this template. The DVWP in the
newly created Product Site throws the following error:

"Unable to display this Web Part. To troubleshoot the problem, open this Web
page in a Windows SharePoint Services-compatible HTML editor such as Microsoft
Office SharePoint Designer. If the problem persists, contact your Web server
administrator."

I suspect this is because the DVWP DataSource is still pointing to the "Product
A Site Description List". Is there a way to set the DVWP so that the "Site
Description List" is dynamic and points to the "current product site" and not
the "original product site"?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Mayur Mandal     Answered On: Nov 29

I actually figured this out. In order  to make the DVWP portable, simply modify
the ListID with ListNames in the source code.

This article was extremely helpful:
mdasblog.wordpress.com/.../replacing-listids-with-listnames-in-dat\
a-view-web-parts/

 
Didn't find what you were looking for? Find more on Data View Web Part and Data Sources Or get search suggestion and latest updates.




Tagged: