Supporters of End User
Web

Data View Web Part, The Basics - Insert a DVWP on Your Page

Current average rating is 5 stars. Press SHIFT+ENTER to rate this item.1 star selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+ESCAPE to leave rating submit mode.2 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.3 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.4 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.5 stars selected. Press SHIFT+ENTER to submit. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.
Categories:SharePoint Designer; Data View Web Part; Data View Web Part Basics; Site Manager/Power User; MOSS; WSS; 2007; 2010
From Mark Miller: Laura Rogers is teaching a live online workshop this Friday: Getting Started with the Data View Web Part. The series of articles starting with the one below, will go over the basics of DVWPs and show how you can build powerful, data run solutions with your existing sites. If you like what you see over the next few days, register for the workshop and get your hands dirty!
Articles in this Series

As I mentioned in my previous article, I am writing a series on the SharePoint 2007 data view web part (DVWP).  These web parts can only be created using SharePoint Designer (SPD).  Now that SharePoint Designer 2007 is free, this opens the door to a lot more people being able to create these web parts, widening the intended audience for these articles.  So let's get started with the basics:

  1. In SharePoint Designer (SPD), click <File> and choose <Open Site>.  Paste the full URL of your SharePoint site, such as http://sharepoint/sites/teamsite
    Notice that I left out the "default.aspx" at the end of the URL.
  2. Click <Open>
    You can see that the left side of the screen shows the folder structure of your site.  Each document library is a folder, and all of the site's lists live under the "Lists" folder.  At this point, the best way to start creating a data view web part (DVWP), is on a blank web part page.  Go to the site in your browser, and create a web part page:
  3. Click <Site Actions> and <Create>.  Choose "Web part page", give it a name, pick a document library to put it in, and click <Create>.  Make a mental note of which doc library you picked.  At the top right, click <Exit edit mode>
  4. Now, in SPD, on the left side, navigate to the new web part page by clicking on the name of the document library from step 3.  The contents of that library will be displayed in the main work area in the middle of the SPD screen.  If you don't see your new file, click the F5 key to refresh the list.
  5. Double-click the name of the new file to open it. 
    Now, it's time to start picking a data source to insert a data view web part.  You see the web part zones displayed on the page, and each zone says "click to insert a web part".  It's important at this point, that you pick a web part zone, and click <Click to insert a web part>.  If a zone is not clicked on, a web part that's inserted could end up on some random spot on the page.
    Data View Web Part Basics
  6. Click the <Data View> menu at the top of the screen, and choose <Insert Data View...>. 

    Since this initial article is really just to show you around in the DVWP, we're not going to do anything fancy.  We'll just insert a regular SharePoint list as our data view.  See, that now on the right side of the screen, there is a "Data Source Library" pane.  The following are types of sources that you can get data from:
    • SharePoint Lists
    • SharePoint Libraries
    • Database Connections
    • XML files
    • Server-side scripts
    • XML Web services
    • Linked Sources
    Data View Web Part Basics
  7. As an example, let's grab some data that�s in a list on the site.  In the "SharePoint Lists" section, pick a list (preferably one with some data in it).  Click the drop-down box on that list name, and choose <Show Data>.
  8. Now, in the pane on the right side of the screen, instead of the "Data Source Library" tab, you'll see the "Data Source Details" tab, that shows the details of the source that was just selected.  This means, that all of the fields in the list are displayed.  There are even some extra fields listed there, that are usually hidden from views.  While holding your CTRL key down, click on three or four field names to select them.
  9. Click <Insert Selected Fields As...> right above those field names.  Choose <Multiple Item View>.  In various articles of this series, I'll go over some of these other options, but this one is the most commonly used.
  10. When the DVWP is first inserted, the "Common Data View Tasks" menu is automatically displayed. 
Data View Web Part Basics

Future articles will go into detail about configuration options such as the ones in this list.  Stay tuned.

Comments

6 Minute Screencast: Insert a Data View Web Part onto a SharePoint Page | End User SharePoint

Data View Web Part, The Basics – Insert a DVWP on Your Page

[...] Data View Web Part, The Basics - Insert a DVWP on Your Page [...]

Posted 12-May-2009 by 6 Minute Screencast: Insert a Data View Web Part onto a SharePoint Page | End User SharePoint
SharePoint Daily

Data View Web Part, The Basics – Insert a DVWP on Your Page

More SharePoint 2010 Details, Reports from TechEd 2009, New Geneva Beta Available... Top News Stories New Microsoft SharePoint 2010 Details Start to Emerge (ZDNet) The few bits I’ve...

Posted 13-May-2009 by SharePoint Daily
Data View Web Part, The Basics - Folders | End User SharePoint

Data View Web Part, The Basics – Insert a DVWP on Your Page

[...] Data View Web Part, The Basics - Insert a DVWP on Your Page [...]

Posted 13-May-2009 by Data View Web Part, The Basics - Folders | End User SharePoint
Data View Web Part, The Basics - Add a Hyperlink | End User SharePoint

Data View Web Part, The Basics – Insert a DVWP on Your Page

[...] already added the document library to the page as a data view web [...]

Posted 14-May-2009 by Data View Web Part, The Basics - Add a Hyperlink | End User SharePoint
Laura Rogers » Blog Archive » Data View Web Part (DVWP) Series

Data View Web Part, The Basics – Insert a DVWP on Your Page

[...] Data View Web Part, The Basics - Insert a DVWP on Your Page - This is a very simple set of instructions on how to insert a data view web part onto a web part page.  Future articles will go into more detail.  [...]

Posted 18-May-2009 by Laura Rogers » Blog Archive » Data View Web Part (DVWP) Series
Rao

Data View Web Part, The Basics – Insert a DVWP on Your Page

Hi,

Can you please provide me the details of Database Connections with ORACLE. I tried in different way but, No luck.

Thanks

Posted 22-May-2009 by Rao
Data View Web Part, The Basics – Multiple Edit Forms | End User SharePoint

Data View Web Part, The Basics – Insert a DVWP on Your Page

[...] multiple edit form is another option.  In the first article in this series, we showed how to insert a data view web part onto a web part page.  Here’s how to insert a multiple edit form [...]

Posted 27-May-2009 by Data View Web Part, The Basics – Multiple Edit Forms | End User SharePoint
Lynnda

Data View Web Part, The Basics – Insert a DVWP on Your Page

Hello Laura, I have created DVWPs in SPD and have added the webparts to other site collections - however It has been a while and the steps to do this have slipped my mind - Once the DVWP has been created on site A - I then want to add to Site B - I believe we can export? I also have a situation where I have used HTML calculated columns to show Color code in Site A and would like very much to show the exact copy of this in Site B for viewing purpose only no editing. Thank you in advance for any info -

Posted 07-Jun-2009 by Lynnda
osevaldo

Data View Web Part, The Basics – Insert a DVWP on Your Page

Dear Laura,
I 'm beginner in this technology, but what is need to create a Web Site from SharePoint like this hosted on http://www.wssdemo.com/blog/default.aspx ?

regards
Osevaldo.

Posted 28-Sep-2009 by osevaldo
Microsoft SharePoint Bloggers

Data View Web Part, The Basics – Insert a DVWP on Your Page

Display Related items in Display Form Page... With over 1,000 Internet sites running on SharePoint listed on my site, I have been looking at ways to...

Posted 05-Oct-2009 by Microsoft SharePoint Bloggers
Laura Rogers » Blog Archive » “For Me” Web part in MOSS

Data View Web Part, The Basics – Insert a DVWP on Your Page

[...] of all, for beginners, here’s my Data View Web Part, The Basics - Insert a DVWP on Your Page and there’s an associated screencast, too.  (There’s a whole series of mine on data [...]

Posted 12-Oct-2009 by Laura Rogers » Blog Archive » “For Me” Web part in MOSS
Dave Cavins » Blog Archive » Dynamic Drive’s Featured Content Slider in Sharepoint

Data View Web Part, The Basics – Insert a DVWP on Your Page

[...] You can find a basic tutorial on using the DVWP here [...]

Posted 10-Nov-2009 by Dave Cavins » Blog Archive » Dynamic Drive’s Featured Content Slider in Sharepoint
Adam Cogan

Data View Web Part, The Basics – Insert a DVWP on Your Page

I think it would be useful to add 'SharePoint 2007' into the title

Useful when you are searching for 'SharePoint 2007' or 'SharePoint 2010' material

Adam Cogan
www.adamcogan.com

Posted 23-Nov-2009 by Adam Cogan
EndUserSharePoint

Data View Web Part, The Basics – Insert a DVWP on Your Page

Adam - We're using a new category for 2010 items. You'll be able to filter by them, showing only 2010 articles. -- Mark

Posted 23-Nov-2009 by EndUserSharePoint
Aru

Data View Web Part, The Basics – Insert a DVWP on Your Page

Hi can I join two list located in two different site with DVWP

Posted 24-Dec-2009 by Aru
Varun Sharma

Data View Web Part, The Basics – Insert a DVWP on Your Page

Hi Mam,

I need to connect to oracle server and to fetch data from oracle server... I have WSS and sharepoint designer and need to connect to oracle.

Can you please help me to attain this

Varun

Posted 23-Jan-2010 by Varun Sharma
EndUserSharePoint

Data View Web Part, The Basics – Insert a DVWP on Your Page

Please post on Stump the Panel and we'll take a look at it from there. -- Mark

Posted 23-Jan-2010 by EndUserSharePoint
kurt

Data View Web Part, The Basics – Insert a DVWP on Your Page

hello,
i want to show document library in drop down dataview part and when i select document library from drop down menu i want to see all the file in other webpart hor to do it?
Thanks

Posted 14-Feb-2010 by kurt
LD

Data View Web Part, The Basics – Insert a DVWP on Your Page

Hello,
I am creating Sharepoint pages under a Sharepoint site. The page is a web part page template. I added my web parts by importing custom web parts so I could just insert tables and add links. Easy.

OK my question is this:
When my webpart page is completed, I want to duplicate this page SEVERAL times and rename the aspx files. I want to basically make many replicas of this page. I want to use this page as a template.

Someone told me I can make a Document Library and upload the web parts I want so that when I create new webpart pages from one of the 8 templates, I can just drag and drop them in there. I created the library and have found no such functionality except adding a web bart called Document Library that only lists the links to the files so this doesn't work.

I even tried downloading my page and uploading it into this document library but there is no button or command for copying the page when creating a new page. I am wishing for a "duplicate" button or "New from..." button that replicates the page.

Is there anything similar to this? Please help because I need to make many pages that are replicas of this page and don't want to have to make them one by one, adding the web parts to each one!

Thanks for your time and concern.

Posted 26-Mar-2010 by LD
Laura P

Data View Web Part, The Basics – Insert a DVWP on Your Page

Hi,
I can't get past number 9 in your instructions, which say:

"Click right above those field names. Choose . "

For me, in SPD the "Insert Selected Fields As" dropdown is grayed out so I can't use it. Any ideas about how to get around this?
Thanks!
LP

Posted 27-Mar-2010 by Laura P
Anusha

Data View Web Part, The Basics – Insert a DVWP on Your Page

Hi,

I am adding DVWP to dispform.aspx of a document library and i am trying to add extra fields that are related to the view. I able to add them to the webpart, but i cannot display data. I am not sure where i am going wrong can please help me with this.

Posted 10-Aug-2010 by Anusha
Mohammed

Data View Web Part, The Basics – Insert a DVWP on Your Page

I have create table in SQL 2005 and retrive its data in to sharepoint with the help of Database connection option through Sharepoint Designer. When configuring the connection i have selected a custom quer with stored procedure option and from the dropdown option selected the insert stored procedure everything is ok.

Stored Procedure
----------------------
CREATE PROCEDURE ChangeTable_insert

(
@ROLE VARCHAR(50) ,
@PROJECT varchar(50) ,
@CENTER NUMERIC(18)
)
AS
BEGIN

INSERT INTO [dbo].[ChangeTable]

(
[Role],
[Project],
[Center]

)

VALUES

(
@ROLE,
@PROJECT ,
@CENTER
)
END

i have created new aspx page in Sharepoint Designer from the datasource details-->Insert selected fields as-->selected new item form and saved this page.
When i opened this page in to browser and try to save data it gives an below error
ERROR:
--------------------
Go back to site
Error: "The data source control failed to execute the insert command.
Troubleshoot issues with Windows SharePoint Services."

please help me. i have to save data to sql database through sharepoint

thanks in advance

Posted 04-Oct-2010 by Mohammed
hasty mehrabi

Data view hyperlink for library in sharepoint

hi
 
i built a sql connection from infopath libraray and us it in data view webpart,
now  i want to make hyperlink column for opening each infopath file.
 
please help me

Posted 19-Jun-2011 by hasty mehrabi
Jesse

What is a Data View Web Part & Why?

nuff asked? I'm not likely going to read the article or follow steps unless I know what I'm doing is going to be useful. Wouldn't you agree? So, a short intro paragraph would be helpful.

Posted 27-Sep-2011 by Jesse
Laura Rogers

what's a DVWP

When you are configuring list settings for your lists and libraries in SharePoint, if there are ways that you want to display the data, and those ways do not exist in the regular list settings, you can use a DVWP instead.  Conditional formatting is a great example.

Posted 28-Sep-2011 by Laura Rogers
david

Error Message: Referenced list no longer exists

Hello Laura, 
Have worked with DVWP in past (not recently though). I've not encountered this before. 
After inserting items by selecting "Multiple Item View" from the insert menu -- I then go to Common Data View Tasks - click on Filter and get "The list that is referenced here no longer exists" error.   when I click OK it opens up the pane for filter selections however, the columns in the pane do not match the columns on the list.  Any ideas on what I'm doing wrong?

Posted 16-Dec-2011 by david

Notify me of comments to this article

E-mail:
   

Add Comment

Title:

 
Comment:
Email:

   


Name:

 
Url: