Stump the Panel » End Users and Information Workers

Aggregating Data Sources featuring Cross List DataSourceMode

(3 posts)
  • Started 2 days ago by pjcolbeck
  • Latest reply from pjcolbeck
  1. I am attempting to create a DVWP featuring aggregated data in a WSS-only environment. This is typically a pretty straightforward proposition using linked sources, but what do you do if you would like to include a list in CrossList DataSourceMode?

    The source for my example looks as follows:

    <DataSources>
    <SharePoint:AggregateDataSource runat="server" IsSynchronous="false" SeparateRoot="true" id="ProjectRollup"><sources>
    <SharePoint:SPDataSource runat="server" DataSourceMode="List" UseInternalName="true" selectcommand="<View></View>">
    <SelectParameters><asp:Parameter Name="ListID" DefaultValue="49A9155F-4590-494B-B667-76EAC5710CAB"/>
    </SelectParameters><DeleteParameters><asp:Parameter Name="ListID" DefaultValue="49A9155F-4590-494B-B667-76EAC5710CAB"/>
    </DeleteParameters><UpdateParameters><asp:Parameter Name="ListID" DefaultValue="49A9155F-4590-494B-B667-76EAC5710CAB"/>
    </UpdateParameters><InsertParameters><asp:Parameter Name="ListID" DefaultValue="49A9155F-4590-494B-B667-76EAC5710CAB"/>
    </InsertParameters>
    </SharePoint:SPDataSource>
    <SharePoint:SPDataSource runat="server" DataSourceMode="CrossList" UseInternalName="true" selectcommand="<View><Webs Scope='Recursive'></Webs><Lists ServerTemplate='106' BaseType='0'></Lists><ViewFields><FieldRef Name='_x0025__x0020_Allocation'/><FieldRef Name='Estimated_x0020_Expense'/><FieldRef Name='Assignment_x0020_Status'/><FieldRef Name='Standard_x0020_Rate'/><FieldRef Name='Actual_x0020_Rate'/></ViewFields></View>">
    </SharePoint:SPDataSource>
    </sources><aggregate><concat name="data source">
    <datasource name="Projects" id="0" Type="SPList"/>
    <datasource name="Staffing" id="1" Type="SPList"/>
    </concat>
    </aggregate>
    </SharePoint:AggregateDataSource>
    </DataSources>

    I've worked with cross list rollups quite a bit, but never aggregated them with other lists. When I look at the script that is generated, the following fragment jumps out as the potential source of my "non-specific error" source:

    <aggregate><concat name="data source">
    <datasource name="Projects" id="0" Type="SPList"/>
    <datasource name="Staffing" id="1" Type="SPList"/>
    </concat>
    </aggregate>

    What modifications to the code are necessary to ensure that all of the lists in the cross list rollup are aggregated into the data source definition?

    Curious,
    Patrick

    Posted 2 days ago #
  2. Not sure if this is what you're referring to, but I've got a blog post where I talk about merging data sources:

    http://spinsiders.com/laurar/2009/01/29/ways-to-display-multiple-document-libraries/

    Posted 23 hours ago #
  3. Thanks Laura!
    Good information. The CQWP would indeed make life easier...unfortunately I'm working in a WSS-only environment. Do you know if it is possible to join cross list SPDataSources to other SPDataSources in WSS 3.0?

    When you create a linked data source, SP Designer inserts the following script after the DVWP <DataSources> callout:

    <SharePoint:AggregateDataSource runat="server" IsSynchronous="" SeparateRoot="true" RootName="" RowsName="" ID="Unique_Combo_ID">
    <Sources>
    <SharePoint:SPDataSource runat="server" ...
    </SharePoint:SPDataSource>
    <SharePoint:SPDataSource runat="server" ....
    </SharePoint:SPDataSource>
    </Sources>
    <aggregate>
    <concat name="data source">
    <datasource name="List1" id="0" Type="SPList"/>
    <datasource name="List2" id="1" Type="SPList"/>
    </concat>
    </aggregate>
    </SharePoint:AggregateDataSource>
    </DataSources>

    I'm assuming that it is pretty straightforward to swap out the SPDataSource script for a functioning "cross list" data source with the default "list" data source, but I don't know how to specify a dynamic list of datasources for the <aggregate> attribute. Any thoughts as to how to accomplish this? Are there any other concerns that I should be aware of when attempting to link cross list data sources?

    Curious,

    Pat

    Posted 21 hours ago #

RSS feed for this topic

Reply

You must log in to post.