Background:
There is no parent-child relationship support in MOSS 2007 lists by default. But as a developer, we all know it is the most common functionality while storing and displaying the data. Following is the technique that I discovered somewhere on the internet to display the data using DataView Control in SharePoint Designer(while developing reports for my last project), but unfortunatily I lost the original source and thought to reproduce it in my blog with some enhancements.

Implementation:
Following are the steps to perform Inner Join on two lists using DataView Control in SharePoint Designer:

1. We need following two lists(with data in them):

  • Department (ID, Title)
  • Student (ID,Department_x0020_ID, Title)

    2. Open SharePoint Designer and create a new ASPX page.

    3. Create a linked datasource by following steps:

    1. Select Create a new Linked Source… from Data Source Library tab.
    2. In Data Source Properties dialog, select Configure Linked Source… button.
    3. From Link Data Sources Wizard, select Students and Department Lists and hit Next.
    4. Choose Join the contents… option and select Finish.
    5. Then select OK to get the New Data Source.
    6. Expand the New Data Source and select Show Data option.
    7. Under Data Source Details tab, you should see both lists (Department and student).

    4. Insert a Data View control into the ASPX page.
    5. Under Data Source Details tab, expand the Students list and drag and drop the Title column to Data View control and it will display all the students.
    6. Now place your cursur in Title column and select Table -> Insert -> Column to Right. In this column we will display Department.Title.
    7. Place your cursor on the first row of new column, select Title Column from Department list and select the Insert selected field as… button and choose Joined Subview opion.
    8. In Join Subview dialog, select Department_x0020_ID = ID and hit OK. (Pic 12)
    9. Thats it :o ).
    10. Play with the HTML to make it look like a report.

  •  

    http://mysplist.blogspot.com/2009/12/inner-join-two-lists-using-sharepoint.html

    Tagged with:
     

    Comments are closed.



    Skype Online Status 

    Contáctanos por Skype Call me! - Rolando Escobar: error
    » Get Skype, call free! Servicios en Línea
     
     
    Servicios Interdata Ltda. Colaboración e Inteligencia de Negocios, SQL Server 2008, Analysis Services, SharePoint, Excel Services, Reporting Services
    Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in /home/interda1/public_html/wp-content/plugins/instant-web-highlighter/roohit.php on line 106

    Warning: require_once(http://roohit.com/site/4wp/wp_2rooh.php?ap=AUTO_PUB_PLUGIN&ihl=Y) [function.require-once]: failed to open stream: no suitable wrapper could be found in /home/interda1/public_html/wp-content/plugins/instant-web-highlighter/roohit.php on line 106

    Fatal error: require_once() [function.require]: Failed opening required 'http://roohit.com/site/4wp/wp_2rooh.php?ap=AUTO_PUB_PLUGIN&ihl=Y' (include_path='.:/usr/local/php52/pear') in /home/interda1/public_html/wp-content/plugins/instant-web-highlighter/roohit.php on line 106
    Window size: x
    Viewport size: x