[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 513
  • Last Modified:

Data views in Publishing pages in SharePoint 2010

Hi, folks.  I am attempting to replicate our old MOSS internet site in SP 2010.  The new site is a Publishing site with Workflow, with Team Collaboration activated.  

We had quite a few pages that included dataviews, and those dataviews were customized in SPD 2007. Things like formatting a column to act as a hyperlink to an item was a common customization.

My question is how can I achieve the same level of control over dataviews in 2010? I have a page layout with a blank web part zone in it, but when I create a page based on it, I cannot insert a dataview in SPD - I get the option of Editing in the Browser, or editing the Page Layout.

I'm used to quickly changing the layout, sorting, grouping, filtering and applying conditional formatting to 2007 data views in 2007.  How can I achieve the same control in a publishing page in 2010?
0
TEEDA
Asked:
TEEDA
  • 9
  • 9
1 Solution
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

you can use a web part page to create the DVWP in SPD 2010, customise it, and once it's perfected, export it from the browser GUI, and then import it into the page you have created from the page layout.

Alternatively, you can create the DVWP directly in the page layout and customise it there, but that would mean it is a fixed part of the page layout.

cheers, teylyn
0
 
TEEDAAuthor Commented:
Thank you!  I wil give that a try.
0
 
TEEDAAuthor Commented:
I inserted a dataview in a web part page, but the export option is missing. Is that standard in 2010?
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Are you using the web part page in the browser? Edit the web part page and the export option is in the drop-down at the top right of the web part.
0
 
TEEDAAuthor Commented:
Yes, I am using the browser, I've tried inserting a web part while in the browser and inserting a dataview in SPD.  I view the page in the browser, choose Edit Page, Edit Web Part - but neither web part is giving me the option to export.

0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hmm. That option shows fine for me in the browser.

You can also use SPD to export the web part. Select the DVWP in SPD and in the Data View Tools of the ribbon click the Web Part tab. On that ribbon is a "Save web part" pane and a command to save "to file".

 save
Does that work?

cheers, teylyn

0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Here is the dropdown menu when I open the web part page in the browser


30-10-2011-11-46-33-a.m..png
0
 
TEEDAAuthor Commented:
Yes, I have seen the export option on some web parts, but for whatever reason, this one doesn't show it.  I did add the webpart to the gallery, but when I attempted to add it to a page, it gave an error.
 
I'm going to create a fresh subsite to do some further testing.  
0
 
TEEDAAuthor Commented:
Tried again, with same results.  3 web parts, 2 for lists, 1 for document library, none give the option of exporting and if saved to gallery, none can be inserted in a page, even one in the same site.  

I was able to create a plain .aspx page, apply my master and insert a dataview there from SPD and customize it, so I guess that's how I will proceed.  

Your help is much appreciated.

0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
List View web parts cannot be exported. For the others, try this:

http://snahta.blogspot.com/2010/07/sp2010-webpart-export-option-missing.html

0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
and here: http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/eaacd0fd-8bf8-4563-8858-9b40530c17b3

for settings in the web.config file on the server that may prevent exporting web parts.
0
 
TEEDAAuthor Commented:
That explains it - these are list views, so exporting is not available by design (though why that would be puzzles me).  Thanks very much - at least now I know it's not something on our end.
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
I thought we were discussing DVWP?

If you use the Data View drop down in SPD and select an existing list, it will actually create a List View web part. To create a _REAL_ Data View Web Part, you need to click the dropdown, then select "Empty Data View". In the inserted web part, click "Click here to select a data source" and then select the list or library you want to report on.

For some more insights, check out Laura Rogers' blog, especially this post http://www.sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?ID=103 and the video

cheers,
0
 
TEEDAAuthor Commented:
I'm probably using the wrong terminology - I have custom lists and wish to provide several filtered views on a publishing page.  I'm used to doing this in SPD, but because this is a publishing site, I wasn't sure how to achieve it.

Many thanks for your assistance. I will check Laura's blog.
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
The thing to be aware of is that even though you click "Data View Web Part" in SharePoint Designer, it will insert a List View Web Part if you select a List from the dropdown. Such a list view web part cannot be exported.

In order to create a Data View Web Part that can be exported, you need to create an empty Data View Web Part, then connect it to a List. After that, you have a real DVWP, which can be exported.

cheers, teylyn
0
 
TEEDAAuthor Commented:
That's very helpful, teylyn, and much appreciated.  Some of the differences between SP2010 and 2007, and between publishing and team sites have been a bit challenging for us. And being under a tight deadline hasn't helped!  A baptism of fire, one might say.
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
I've never worked much with SPD 2007, but I understand that it had a command to convert a List View Web Part to a DVWP. SPD 2010 no longer offers that approach. You have to go the route to add an empty DVWP and then connect it to the list.
0
 
TEEDAAuthor Commented:
It did indeed, and I used it a lot.  Will begin playing now with empty dataviews in 2010 - I'm sure it will allow me to achieve the same control over the presentation of the data.  
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 9
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now