I used SharePoint Designer 2007 to create a joined view of two lists and changed the 'ListID' parameters to 'ListName'. The list is grouped and sorted. Update: When the joined subview is in the header, it works without any issues in dev but in production I get the following error:
Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.
Other web parts using single list DVWPs on the same data sources display correctly. SharePoint Designer has been disabled on production. Anyone have any clues on how to go about troubleshooting this error or what might be wrong?
Update: I was able to isolate the error to calling the joined subview template inside the header (grouped) row. When I remove the template call (<xsl:call-template name="BM_Activity" />
) from the code, the web part displays (although without the necessary table) correctly in production.
Here is some sample code that replicates the error:
<xsl:template name="BM_Study.groupheader0">
<xsl:param name="fieldtitle" />
<xsl:param name="fieldname" />
<xsl:param name="fieldvalue" />
<xsl:param name="fieldtype" />
<xsl:param name="nodeset" />
<xsl:param name="groupid" />
<xsl:param name="displaystyle" />
<xsl:param name="imagesrc" />
<xsl:param name="alttext" />
<xsl:param name="altname" />
<xsl:param name="hidedetail" />
<xsl:param name="showheader" />
<xsl:param name="showheadercolumn" />
<xsl:if test="$showheader" ddwrt:cf_ignore="1">
<tr id="group{$groupid}" style="display:{$displaystyle}">
<td class="ms-gb" style="background:#cccccc;" colspan="99">
<xsl:choose>
<xsl:when test="$groupid='0' or $groupid='9'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$groupid='1'">
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&nbsp;</xsl:text>
</xsl:when>
<xsl:when test="$groupid='2'">
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&nbsp;</xsl:text>
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&nbsp;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&nbsp;</xsl:text>
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&nbsp;</xsl:text>
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&nbsp;</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="not($hidedetail)" ddwrt:cf_ignore="1">
<a href="javascript:" onclick="javascript:ExpGroupBy(this);return false;">
<img src="{$imagesrc}" border="0" alt="{$alttext}" name="{$altname}" /></a>
</xsl:if>
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">&nbsp;</xsl:text>
<b>
<xsl:value-of select="$fieldtitle" />
</b>
<xsl:if test="$fieldtitle">: </xsl:if>
<xsl:choose>
<xsl:when test="$fieldtype='url'">
<a href="{$fieldvalue}">
<xsl:value-of select="$fieldvalue" />
</a>
</xsl:when>
<xsl:when test="$fieldtype='user'">
<xsl:value-of select="$fieldvalue" disable-output-escaping="yes" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$fieldvalue" />
</xsl:otherwise>
</xsl:choose>
<xsl:call-template name="BM_Activity" />
</td>
</tr>
</xsl:if>
</xsl:template>
<xsl:variable name="BM_Activity_automode">0</xsl:variable>
<xsl:template name="BM_Activity">
<xsl:variable name="dvt_StyleName">Table</xsl:variable>
<xsl:variable name="dvt_ParentRow" select="current()" />
<xsl:variable name="Rows" select="/dsQueryResponse/Dev_Sci_Biomarker_Activity/Rows/Row[@Study_x0020_ID=$dvt_ParentRow/@Title]" />
<table border="0" width="100%" cellpadding="2" cellspacing="0">
<tr valign="top">
<xsl:if test="$BM_Activity_automode = '1'" ddwrt:cf_ignore="1">
<th class="ms-vh" width="1%" nowrap="nowrap"></th>
</xsl:if>
<th class="ms-vh" nowrap="" style="height: 19px">Study ID</th>
</tr>
<xsl:call-template name="BM_Activity.body">
<xsl:with-param name="Rows" select="$Rows" />
<xsl:with-param name="dvt_ParentRow" select="$dvt_ParentRow" />
</xsl:call-template>
</table>
</xsl:template>
<xsl:template name="BM_Activity.body">
<xsl:param name="Rows" />
<xsl:param name="dvt_ParentRow" />
<xsl:for-each select="$Rows">
<xsl:call-template name="BM_Activity.rowview" />
</xsl:for-each>
</xsl:template>
<xsl:template name="BM_Activity.rowview">
<tr>
<xsl:if test="$BM_Activity_automode = '1'" ddwrt:cf_ignore="1">
<td class="ms-vb" width="1%" nowrap="nowrap">
<span ddwrt:amkeyfield="ID" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(@ID))" ddwrt:ammode="view"></span>
</td>
</xsl:if>
<td class="ms-vb">
<xsl:value-of select="@Study_x0020_ID" />
</td>
</tr></xsl:template>