Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 24th, 2009, 05:37 PM
Registered User
 
Join Date: Feb 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question Totalling a column in XSL for Sharepoint Site

Hi,

I'm creating a table in Sharepoint Designer, and I need for it to sum/total all columns and present that information in the table I've created. I've included the (really long) code below and highlighted in bold the cell that I'm working with. I can only get it to return a zero, but there is really data in the list it's trying to extract from (I've already double-checked that the cell is classified as numbers). I've been working on this for several days straight to no avail and would love any assistance anyone could give.

Is the problem just that Sharepoint refuses to total/sum columns, even in Designer?

Thanks again!!
CarGal


<head runat="server">
<META name="WebPartPageExpansion" content="full">
<meta name="ProgId" content="SharePoint.WebPartPage.Document">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Sales Forecasting</title>
<meta name="Microsoft Theme" content="Granite 1011, default">
<style type="text/css">
.style3 {
border: 3px solid #FF0000;
background-color: #F2F0E6;
}
.style4 {
font-family: Biondi;
}
.style5 {
font-family: Arial;
}
</style>
</head>

<body>

<form id="form1" runat="server">
<WebPartPages:DataFormWebPart runat="server" IsIncluded="True" FrameType="None" NoDefaultStyle="TRUE" ViewFlag="0" Title="Sales Forecasting" __markuptype="vsattributemarkup" __WebPartId="{0BAC5733-5AAA-4CE0-95EA-743FE172CEF4}" id="g_6aa6ac99_0cb7_490e_81d8_64e8c05209d2" __AllowXSLTEditing="true" WebPart="true" Height="" Width="">
<DataSources><SharePoint:SPDataSource runat="server" DataSourceMode="List" UseInternalName="true" selectcommand="&lt;View&gt;&lt;Query&gt;&lt;Where& gt;&lt;Eq&gt;&lt;FieldRef Name=&quot;Mgr_x0020_View_x003f_&quot;/&gt;&lt;Value Type=&quot;Text&quot;&gt;Yes&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;" id="dataformwebpart2"><SelectParameters><WebPartPa ges:DataFormParameter Name="ListID" ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="F9346AE0-6F48-43AF-8553-F14A5214E47C"/></SelectParameters><DeleteParameters><WebPartPages:D ataFormParameter Name="ListID" ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="F9346AE0-6F48-43AF-8553-F14A5214E47C"/></DeleteParameters><UpdateParameters><WebPartPages:D ataFormParameter Name="ListID" ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="F9346AE0-6F48-43AF-8553-F14A5214E47C"/></UpdateParameters><InsertParameters><WebPartPages:D ataFormParameter Name="ListID" ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="F9346AE0-6F48-43AF-8553-F14A5214E47C"/></InsertParameters></SharePoint:SPDataSource></DataSources>

<datafields>@Sales_x0020_Month,Sales Month;@Title,Sales Rep;@Sales_x0020_Manager,Sales Manager;@MRV_x0020_Forecast,MRV Forecast;@MRV_x0020_Credit_x0020_in_x0020_,MRV Credit in Spa;@MRV_x0020_in_x0020_Process_x0020,MRV in Process (Pending OE);@MRV_x0020_Pending_x0020_Sales_x0,MRV Pending Sales Submission;@Sales_x0020_Notes,Sales Notes;@Cust_x0020__x002f__x0020_Product,Cust / Product Description;@MRV_x0020_Amount,MRV Pending Sales Submit;@Issue_x0020_Preventing_x0020_OE,Issue Preventing OE;@Date_x0020_OA_x0027_d,Date OA&apos;d;@Activity_x0020_Pending_x0020_Sub,Activi ty Pending Sub to CIPM;@Tier,Tier;@Current_x0020_Month_x003f_,OA&apo s;d Current Month?;@Sales_x0020_Current_x0020_Month_,Sales Current Month?;@Mgr_x0020_View_x003f_,Mgr View?;@MRV_x0020_in_x0020_Impl_x0020_Bu,MRV in Impl Bucket;@Sales_x0020_Submitted_x0020_to_x,Sales Submitted to Impl?;@ID,ID;@ContentType,Content Type;@Modified,Modified;@Created,Created;@Author,C reated By;@Editor,Modified By;@_UIVersionString,Version;@Attachments,Attachme nts;@File_x0020_Type,File Type;@FileLeafRef,Name (for use in forms);@FileDirRef,Path;@FSObjType,Item Type;@_HasCopyDestinations,Has Copy Destinations;@_CopySource,Copy Source;@ContentTypeId,Content Type ID;@_ModerationStatus,Approval Status;@_UIVersion,UI Version;@Created_x0020_Date,Created;@FileRef,URL Path;</datafields>
<XSL><xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls " xmlns:ddwrt2="urn:frontpage:internal">
<xsl:output method="html" indent="no"/>
<xsl:decimal-format NaN=""/>
<xsl:param name="dvt_apos">'</xsl:param>
<xsl:param name="ListID">F9346AE0-6F48-43AF-8553-F14A5214E47C</xsl:param>
<xsl:param name="Current_Month">&quot;Current&quot;</xsl:param>
<xsl:param name="dvt_adhocmode" />
<xsl:param name="dvt_1_form_editkey" />
<xsl:param name="dvt_filterfield" />
<xsl:param name="dvt_filterval" />
<xsl:param name="Sales_Mgr" />
<xsl:variable name="dvt_1_automode">1</xsl:variable>

<xsl:template match="/" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls ">
<xsl:call-template name="dvt_1"/>
</xsl:template>

<xsl:template name="dvt_1.header">
<xsl:param name="Rows" />
<table cellSpacing="0" cellPadding="4" border="0" width="100%">
<tr>
<td class="ms-vb">
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">&amp;nbsp;</xsl:text>

</td>
</tr>
</table>
</xsl:template>
<xsl:template name="dvt_1.toolbar">
<xsl:param name="Rows" />
<table cellSpacing="0" cellPadding="2" border="0" class="ms-toolbar" style="margin-left: 3px; margin-right: 5px;">
<tr>
<td width="99%"></td>
</tr>
</table>
<xsl:if test="$dvt_adhocmode = 'filter'" ddwrt:cf_ignore="1">
<table cellSpacing="0" cellPadding="2" border="0" class="ms-toolbar" style="margin-left: 3px; margin-right: 5px;">
<tr>
<th nowrap="nowrap">
<table>
<tr>
<td class="ms-toolbar" nowrap="nowrap">
<xsl:call-template name="dvt.filterfield">
<xsl:with-param name="fieldname">@Sales_x0020_Manager</xsl:with-param>

<xsl:with-param name="fieldtitle">Sales Manager</xsl:with-param>

<xsl:with-param name="Rows" select="$Rows" />

<xsl:with-param name="fieldtype">text</xsl:with-param>

</xsl:call-template>

</td>
</tr>
</table>
</th>
<th nowrap="nowrap">
<table>
<tr>
<td class="ms-toolbar" nowrap="nowrap">
<xsl:call-template name="dvt.filterfield">
<xsl:with-param name="fieldname">@MRV_x0020_Forecast</xsl:with-param>

<xsl:with-param name="fieldtitle">MRV Forecast</xsl:with-param>

<xsl:with-param name="Rows" select="$Rows" />

<xsl:with-param name="fieldtype">text</xsl:with-param>

</xsl:call-template>

</td>
</tr>
</table>
</th>
<th nowrap="nowrap">
<table>
<tr>
<td class="ms-toolbar" nowrap="nowrap">
<xsl:call-template name="dvt.filterfield">
<xsl:with-param name="fieldname">@MRV_x0020_Credit_x0020_in_x0020_ </xsl:with-param>

<xsl:with-param name="fieldtitle">MRV Credit in Spa</xsl:with-param>

<xsl:with-param name="Rows" select="$Rows" />

<xsl:with-param name="fieldtype">text</xsl:with-param>

</xsl:call-template>

</td>
</tr>
</table>
</th>
<th nowrap="nowrap">
<table>
<tr>
<td class="ms-toolbar" nowrap="nowrap">
<xsl:call-template name="dvt.filterfield">
<xsl:with-param name="fieldname">@Sales_x0020_Notes</xsl:with-param>

<xsl:with-param name="fieldtitle">Sales Notes</xsl:with-param>

<xsl:with-param name="Rows" select="$Rows" />

<xsl:with-param name="fieldtype">Note</xsl:with-param>

</xsl:call-template>

</td>
</tr>
</table>
</th>
<td width="99%"></td>
</tr>
</table>
</xsl:if>
<hr></hr>
</xsl:template>
<xsl:template name="dvt.filterfield">
<xsl:param name="fieldname" />
<xsl:param name="fieldtitle" />
<xsl:param name="Rows" />
<xsl:param name="fieldtype" />
<xsl:variable name="dvt_FieldNameNoAtSign" select="substring-after($fieldname, '@')" />
<xsl:variable name="filtertype">
<xsl:if test="starts-with($fieldtype,'date')">date</xsl:if>
</xsl:variable>
<xsl:variable name="sorttype">
<xsl:choose>
<xsl:when test="starts-with($fieldtype,'number')">number</xsl:when>
<xsl:otherwise>text</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="clientText">&apos; + this.options[this.selectedIndex].value + &apos;</xsl:variable>
<xsl:if test="not(contains($fieldname, '/')) and not(contains($fieldname, '['))" ddwrt:cf_ignore="1">
<xsl:value-of select="$fieldtitle" />
<xsl:text disable-output-escaping="yes">:&lt;br&gt;</xsl:text>
<select name="{$fieldname}_filterval">
<xsl:attribute name="onchange">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('NotUTF8;d vt_filterfield={',$fieldname,'};dvt_filtertype={', $filtertype,'};dvt_adhocmode={false()};dvt_filterv al={',$clientText,'}'))" />;</xsl:attribute>
<option value="##dvt_empty##">
<xsl:if test="$dvt_filterfield=$fieldname and $dvt_filterval=''">
<xsl:attribute name="selected">true</xsl:attribute>
</xsl:if>
(Empty)</option>

<option value="##dvt_all##">
<xsl:choose>
<xsl:when test="not($dvt_filterfield)">
<xsl:attribute name="selected">true</xsl:attribute>
</xsl:when>
<xsl:when test="$dvt_filterfield!=$fieldname">
<xsl:attribute name="selected">true</xsl:attribute>
</xsl:when>
</xsl:choose>
(All)</option>

<xsl:value-of select="ddwrt:NameChanged('',1)" />
<xsl:choose>
<xsl:when test="starts-with($fieldname, '@')">
<xsl:variable name="dvt_Rows">
<xsl:for-each select="$Rows">
<xsl:sort select="@*[name()=$fieldname]" order="ascending" data-type="{$sorttype}" />

<xsl:copy-of select="." />
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="msxsl:node-set($dvt_Rows)/*[not(@*[name()=$dvt_FieldNameNoAtSign]=preceding-sibling::*[1]/@*[name()=$dvt_FieldNameNoAtSign])]/@*[name()=$dvt_FieldNameNoAtSign]">
<xsl:sort data-type="{$sorttype}" />
<xsl:call-template name="dvt.filteroption">
<xsl:with-param name="name" select="$fieldname" />
<xsl:with-param name="value" select="." />
<xsl:with-param name="type" select="$fieldtype" />
</xsl:call-template>
</xsl:for-each>
</xsl:when>
<xsl:when test="$fieldname = '.'">
<xsl:variable name="dvt_Rows">
<xsl:for-each select="$Rows">
<xsl:sort select="." order="ascending" data-type="{$sorttype}" />

<xsl:copy-of select="." />
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="msxsl:node-set($dvt_Rows)/*[not(.=preceding-sibling::*[1])]">
<xsl:sort data-type="{$sorttype}" />
<xsl:call-template name="dvt.filteroption">
<xsl:with-param name="name" select="$fieldname" />
<xsl:with-param name="value" select="." />
<xsl:with-param name="type" select="$fieldtype" />
</xsl:call-template>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="dvt_Rows">
<xsl:for-each select="$Rows">
<xsl:sort select="*[name()=$fieldname]" order="ascending" data-type="{$sorttype}" />

<xsl:copy-of select="." />
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="msxsl:node-set($dvt_Rows)/*[not(*[name()=$fieldname]=preceding-sibling::*[1]/*[name()=$fieldname])]/*[name()=$fieldname]">
<xsl:sort data-type="{$sorttype}" />
<xsl:call-template name="dvt.filteroption">
<xsl:with-param name="name" select="$fieldname" />
<xsl:with-param name="value" select="." />
<xsl:with-param name="type" select="$fieldtype" />
</xsl:call-template>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="ddwrt:NameChanged('',1)" />

</select>
</xsl:if>
</xsl:template>
<xsl:template name="dvt.filteroption">
<xsl:param name="name" />
<xsl:param name="value" />
<xsl:param name="type" />
<xsl:if test="not(starts-with($type,'date')) or ddwrt:NameChanged($value,1)">
<xsl:variable name="output">
<xsl:choose>
<xsl:when test="$type = 'number'">
<xsl:value-of select="format-number($value,'#,##0.##;-#,##0.##')" />
</xsl:when>
<xsl:when test="starts-with($type,'number|')">
<xsl:variable name="spec" select="substring-after($type,'|')" />
<xsl:choose>
<xsl:when test="contains($spec, 'lcid')">
<xsl:variable name="apos">&apos;</xsl:variable>
<xsl:variable name="realspec" select="substring-after($spec, $apos)" />
<xsl:variable name="formatspec" select="substring-before($realspec, $apos)" />
<xsl:variable name="formatspec2" select="substring-after($realspec, $apos)" />
<xsl:variable name="lcid" select="normalize-space(substring-after($formatspec2, ','))" />
<xsl:value-of select="format-number($value,string($formatspec), substring($lcid,2,string-length($lcid)-2))" />

</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number($value,substring($spec,2,string-length($spec)-2))" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="starts-with($type,'date')">
<xsl:value-of select="ddwrt:FormatDate(string($value),1033,3)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$value" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<option>
<xsl:attribute name="value">
<xsl:value-of select="ddwrt:ConnEncode(normalize-space($value))" />
</xsl:attribute>
<xsl:if test="$dvt_filterfield=$name and $dvt_filterval=normalize-space($value) and $dvt_filterval!=''">
<xsl:attribute name="selected">true</xsl:attribute>
</xsl:if>
<xsl:choose>
<xsl:when test="string-length($output) &gt; 40">
<xsl:value-of select="substring($output, 1, 40)" /> ...
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$output" />
</xsl:otherwise>
</xsl:choose>
</option>

</xsl:if>
</xsl:template>
<xsl:template name="dvt_1">
<xsl:variable name="dvt_StyleName">2ColFrm</xsl:variable>
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" />
<xsl:call-template name="dvt_1.toolbar">
<xsl:with-param name="Rows" select="$Rows" />
</xsl:call-template>
<xsl:call-template name="dvt_1.header">
<xsl:with-param name="Rows" select="$Rows" />
</xsl:call-template>
<table border="1" width="100%">
<tr>
<xsl:call-template name="dvt_1.body">
<xsl:with-param name="Rows" select="$Rows" />
</xsl:call-template>
</tr>
</table>
</xsl:template>
<xsl:template name="dvt_1.body">
<xsl:param name="Rows" />
<xsl:for-each select="$Rows">
<xsl:choose>
<xsl:when test="$dvt_1_form_editkey = ddwrt:EscapeDelims(string(@ID))">
<xsl:call-template name="dvt_1.rowedit">
<xsl:with-param name="Pos" select="concat('_', position())" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="dvt_1.rowview" />
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_1.rowview">
<td valign="top" width="50%">
<table cellspacing="0" width="100%" class="style3">
<tr>
<td width="25%" class="style4">Sales Manager:</td>
<td width="75%" class="style5">
<xsl:value-of select="@Sales_x0020_Manager" />
</td>
</tr>
<tr>
<td width="25%" class="style4">MRV Forecast:</td>
<td width="75%" class="style5">
<xsl:value-of select="@MRV_x0020_Forecast" />
</td>
</tr>
<tr>
<td width="25%" class="style4">MRV Credit in Spa:</td>
<td width="75%" class="style5">
<xsl:value-of select="@MRV_x0020_Credit_x0020_in_x0020_" />
</td>
</tr>
<tr>
<td width="25%" class="style4">MRV Pending Sales Submit:</td>
<td width="75%" class="style5">
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
<xsl:variable name="nodeset" select="msxsl:node-set($Rows)" />
<xsl:value-of select ="sum(/dsQueryResponse/Rows/Row[normalize-space(@MRV_x0020_Amount) &gt; number(0)])" />


</td>
</tr>
<tr>
<td width="25%" class="style4">Sales Notes:</td>
<td width="75%" class="ms-vb">
<xsl:value-of select="@Sales_x0020_Notes" />
</td>
</tr>
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<tr>
<td colspan="2" class="ms-vb">
<xsl:call-template name="dvt_1.automode">
<xsl:with-param name="KeyField">ID</xsl:with-param>
<xsl:with-param name="KeyValue" select="ddwrt:EscapeDelims(string(@ID))" />
<xsl:with-param name="Mode">view</xsl:with-param>
</xsl:call-template>

</td>
</tr>
</xsl:if>
</table>
</td>
<xsl:if test="position() mod 2 = 0" ddwrt:cf_ignore="1">
<xsl:text disable-output-escaping="yes">&lt;/tr&gt;</xsl:text>
<xsl:if test="position() != last()" ddwrt:cf_ignore="1">
<xsl:text disable-output-escaping="yes">&lt;tr&gt;</xsl:text>
</xsl:if>
</xsl:if>
<xsl:if test="position() = last()" ddwrt:cf_ignore="1">
<xsl:if test="position() mod 2 != 0" ddwrt:cf_ignore="1">
<td>
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">&amp;nbsp;</xsl:text>

</td>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template name="dvt_1.rowedit">
<xsl:param name="Pos" />
<td valign="top" width="50%">
<table border="0" cellspacing="0" width="100%">
<tr>
<td width="25%" class="ms-vb">
<b>Sales Manager:</b>
</td>
<td width="75%" class="ms-vb">
<SharePoint:formfield runat="server" id="ff9{$Pos}" ControlMode="Edit" FieldName="Sales_x0020_Manager" ItemId="{@ID}" __designer:bind="{ddwrt:DataBind('u',concat('ff9', $Pos),'Value','ValueChanged','ID',ddwrt:EscapeDeli ms(string(@ID)),'@Sales_x0020_Manager')}" />
<SharePoint:fielddescription runat="server" id="ff9description{$Pos}" FieldName="Sales_x0020_Manager" ControlMode="Edit" />
</td>
</tr>
<tr>
<td width="25%" class="ms-vb">
<b>MRV Forecast:</b>
</td>
<td width="75%" class="ms-vb">
<SharePoint:formfield runat="server" id="ff10{$Pos}" ControlMode="Edit" FieldName="MRV_x0020_Forecast" ItemId="{@ID}" __designer:bind="{ddwrt:DataBind('u',concat('ff10' ,$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDel ims(string(@ID)),'@MRV_x0020_Forecast')}" />
<SharePoint:fielddescription runat="server" id="ff10description{$Pos}" FieldName="MRV_x0020_Forecast" ControlMode="Edit" />
</td>
</tr>
<tr>
<td width="25%" class="ms-vb">
<b>MRV Credit in Spa:</b>
</td>
<td width="75%" class="ms-vb">
<SharePoint:formfield runat="server" id="ff11{$Pos}" ControlMode="Edit" FieldName="MRV_x0020_Credit_x0020_in_x0020_" ItemId="{@ID}" __designer:bind="{ddwrt:DataBind('u',concat('ff11' ,$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDel ims(string(@ID)),'@MRV_x0020_Credit_x0020_in_x0020 _')}" />
<SharePoint:fielddescription runat="server" id="ff11description{$Pos}" FieldName="MRV_x0020_Credit_x0020_in_x0020_" ControlMode="Edit" />
</td>
</tr>
<tr>
<td width="25%" class="ms-vb">
<b>Sales Notes:</b>
</td>
<td width="75%" class="ms-vb">
<SharePoint:formfield runat="server" id="ff12{$Pos}" ControlMode="Edit" FieldName="Sales_x0020_Notes" ItemId="{@ID}" __designer:bind="{ddwrt:DataBind('u',concat('ff12' ,$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDel ims(string(@ID)),'@Sales_x0020_Notes')}" />
<SharePoint:fielddescription runat="server" id="ff12description{$Pos}" FieldName="Sales_x0020_Notes" ControlMode="Edit" />
</td>
</tr>
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<tr>
<td colspan="99" class="ms-vb">
<xsl:call-template name="dvt_1.automode">
<xsl:with-param name="KeyField">ID</xsl:with-param>
<xsl:with-param name="KeyValue" select="ddwrt:EscapeDelims(string(@ID))" />
<xsl:with-param name="Mode">edit</xsl:with-param>
</xsl:call-template>

</td>
</tr>
</xsl:if>
</table>
</td>
<xsl:if test="position() mod 2 = 0" ddwrt:cf_ignore="1">
<xsl:text disable-output-escaping="yes">&lt;/tr&gt;</xsl:text>
<xsl:if test="position() != last()" ddwrt:cf_ignore="1">
<xsl:text disable-output-escaping="yes">&lt;tr&gt;</xsl:text>
</xsl:if>
</xsl:if>
<xsl:if test="position() = last()" ddwrt:cf_ignore="1">
<xsl:if test="position() mod 2 != 0" ddwrt:cf_ignore="1">
<td>
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
</td>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template name="dvt_1.automode">
<xsl:param name="KeyField" />
<xsl:param name="KeyValue" />
<xsl:param name="Mode" />
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<xsl:choose>
<xsl:when test="$Mode = 'edit'">
<td class="ms-vb">
<a href="javascript: {ddwrt:GenFireServerEvent('__commit')}">save</a>
</td>
<td class="ms-vb" />
<td class="ms-vb">
<a href="javascript: {ddwrt:GenFireServerEvent('__cancel')}">cancel</a>
</td>
</xsl:when>
<xsl:when test="$Mode = 'insert'">
<td class="ms-vb">
<a href="javascript: {ddwrt:GenFireServerEvent('__commit')}">save</a>
</td>
<td class="ms-vb" />
<td class="ms-vb">
<a href="javascript: {ddwrt:GenFireServerEvent('__cancel')}">cancel</a>
</td>
</xsl:when>
<xsl:otherwise><td class="ms-vb">
<a href="javascript: {ddwrt:GenFireServerEvent(concat('__cancel;dvt_1_f orm_editkey={',$KeyValue,'}'))}">edit</a></td></xsl:otherwise>
</xsl:choose>
</tr>
</table>
</xsl:template>
</xsl:stylesheet></XSL>
<parameterbindings>
<ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
<ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
<ParameterBinding Name="dvt_adhocmode" Location="Postback;Connection"/>
<ParameterBinding Name="dvt_1_form_editkey" Location="Postback;Connection"/>
<ParameterBinding Name="dvt_filterfield" Location="Postback;Connection"/>
<ParameterBinding Name="dvt_filterval" Location="Postback;Connection"/>
<ParameterBinding Name="ListID" Location="None" DefaultValue="F9346AE0-6F48-43AF-8553-F14A5214E47C"/>
<ParameterBinding Name="Current_Month" Location="None" DefaultValue="&quot;Current&quot;"/>
<ParameterBinding Name="Sales_Mgr" Location="QueryString(Sales Manager)" DefaultValue=""/>
</parameterbindings></WebPartPages:DataFormWebPart>
</form>

</body>

</html>
 
Old February 26th, 2009, 03:28 AM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 291
Thanks: 9
Thanked 29 Times in 29 Posts
Thumbs up

I don't have knowledge in Sharepoint Designer. If you can show your input xml, we can check for any error.
__________________
Rummy





Similar Threads
Thread Thread Starter Forum Replies Last Post
Creation of DMS site in SharePoint 2007 GAUTAM SharePoint Development 1 January 30th, 2009 04:34 AM
Publish column in sharepoint site ruso77 Infopath 0 May 10th, 2007 09:23 AM
sharepoint site performance paradipn SharePoint Admin 0 April 4th, 2007 04:52 AM
Active Directory connection to SharePoint site anandhienator SharePoint Development 0 February 20th, 2007 07:06 AM
Integrating Exchange Server with Sharepoint site sreedhardotnet General .NET 1 April 27th, 2005 08:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.