CrossSiteDataSource

Apr 24, 2009 at 8:26 PM
Hi,
 I am just exploring Sharepoint technologies. We are having a requirement of consolidating the Calendar events which are present in the subsites and displaying the same in the Home page when the user logs in. I got to know about Rollup webpart and used and deployed the same in our server and it works fine for Custom lists.
This was the datasource which i used for consolidating custom lists and it worked fine for displaying the items from Custom lists.

<%@ Register TagPrefix='wpns1' Namespace='PS.WebParts' Assembly='PS.WebParts.Rollup, Version=12.0.0.0, Culture=neutral, PublicKeyToken=90e3045b123af1c3' %>

<wpns1:CrossSiteDataSource

    runat='server' Scope='Recursive' DatesInISO8601='True' FixLookups='True' Lists='100'

    QueryRowLimit='100' ContentType='Item' ID='DSC' TopLevelSite='/' IncludeListData='true'>

<Fields>

    <FieldRef Name='Title' /><FieldRef Name='Editor' /><FieldRef Name='Modified' />

</Fields>

<Query></Query>

</wpns1:CrossSiteDataSource>
It displays the Title of the list items and the output is fine.

When I modified the code to display the Calendar lists, I couldn't get the desired output. The code which I used for displaying the calendar events is shown below.
I just modified the list as "106" as that was meant for Calendar items.

<%@ Register TagPrefix='wpns1' Namespace='PS.WebParts' Assembly='PS.WebParts.Rollup, Version=12.0.0.0, Culture=neutral, PublicKeyToken=90e3045b123af1c3' %>

<wpns1:CrossSiteDataSource

    runat='server' Scope='Recursive' DatesInISO8601='True' FixLookups='True' Lists='106'

    QueryRowLimit='100' ID='DSC' TopLevelSite='/' IncludeListData='true'>

<Fields>

    <FieldRef Name='Title' />

</Fields>

<Query></Query>

</wpns1:CrossSiteDataSource>


Can someone help me what I went wrong when I selected the calendar lists?

Moreover, how to display both the start time and end time along with Title as a link in the calendar?

Kindly help me out in this regard. Thanks in advance.
May 15, 2009 at 7:06 PM

It looks like you removed the ContentType attribute which, while ignored when you have a query, might still be required.

Jun 7, 2010 at 2:03 PM

This one works for me:

<%@ Register TagPrefix="wpns8" Namespace="PS.WebParts" Assembly="PS.WebParts.Rollup, Version=12.0.0.0, Culture=neutral, PublicKeyToken=90e3045b123af1c3" %>

<wpns8:CrossSiteDataSource runat="server" ContentType="Event" TopLevelSite="./" Scope="Recursive" Lists="106" IncludeListData="True" DatesInISO8601="True" FixLookups="True" QueryRowLimit="1000" ID="DSC"><Fields>

<FieldRef Name="Title" />
<FieldRef Name="EventDate" />
<FieldRef Name="EndDate" />
<FieldRef Name="Location" />
<FieldRef Name="Description" /></Fields>
<Query>
<Where><Neq><FieldRef Name="Title" /><Value Type="Text"></Value></Neq><OrderBy><FieldRef Name="EventDate" Ascending="False" /></OrderBy></Where></Query>
</wpns8:CrossSiteDataSource>