Merged Data Sources for the DataView web part

I’d a question from a reader (gee, I have readers!) about doing content rollup using the DataView web part. He was asking if he could use the DataView web part even though the things he was pulling into his Data Source didn’t all have the same columns. Would this work? Well, one way to find out… For this experiment, I had two children of the Document Site Content Type – an Item Document type, which has an extra ‘Lookup’ column referencing another list…

… and a Document List content type, which had a couple of extra columns – % Complete, and Callback Number

Next, I opened my site in SharePoint Designer, and went to the Data Source Library…

I clicked to create a new Linked Data Source and was presented with this dialog:

I clicked to Configure Linked Data Source… and I could now add my data sources…

… which I did…

And clicked next, where I was given a choice of type of linking to do…

I could merge the sources into one big list, or join them into wider records. I’ve never really done the latter, but I imagine that there are lots of uses for that – linking Order items with Customer items, and so on. Think of it as just like joining database tables in a SQL query. For this, though, I just merged my sources into one list.

This gave me a Data Source which I then used for my DataView

Presto! Items merged, despite their having different columns. Ones that an item doesn’t have are just shown as blank.

Merged Data Sources for the DataView web part

4 thoughts on “Merged Data Sources for the DataView web part

  1. John Hanna says:

    This technique is working out very well.

    I’ve also found that a merge-linked data source can be further join-linked to another source to create a “joined subview”. This is helpful because of limitations in lookups between lists (bringing in columns from a reference list).

    However, there seems to be a big issue. A joined-subview repeats it’s column headings for each row. This is problematic for sorting and grouping, or for viewing and working in exports to Excel.

    Is there a way to have all the column headings of a joined view presented a single top row, rather than being repeated?

  2. Swati Jain says:

    I have used the same technique, but now I want to add some filters into the second table. For each record in the first table, I have multiple records in the second table. I want to get only the latest record from the second table. I need to put that filter in the liked data source. Any suggestions.

  3. Nick D says:

    I have done the same for a project I’m working on, however, in the 9 document libraries that I am linking into the linked data source for this view there are subfolders. How can I make this data view display ALL of the files in and outside of the subfolders.

    Note: I have done some searching and this seems to be easily accomplished by going to the Data Source Properties. My problem is that I do not get that window when i select the datasource (or dsQueryResponse in my case). Is it because I am using a linked source?

  4. Nidhi says:

    Data-view is not getting updated when we update the data-source later means merged new list in a data-source. Any Suggestions???

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.