0

So, I've come across a slight issue that I don't know how to fix in SharePoint 2013, I've been able to join 2 lists into a single view through the use of a Data source, whilst this has provided me with somewhat of a solution there is just one issue I can't figure out... The column titles are row and milestones, whilst milestones is correct row spans across 5 column names... Has anyone any idea on how to fix this?

Link to image

<WebPartPages:DataFormWebPart runat="server" IsIncluded="True" AsyncRefresh="True" FrameType="None" NoDefaultStyle="TRUE" ViewFlag="8" Title="D1 Milestone Combination" PageType="PAGE_NORMALVIEW" __markuptype="vsattributemarkup" __WebPartId="{BC5C903B-C592-4ED4-83BD-B96E82D9B855}" id="g_bc5c903b_c592_4ed4_83bd_b96e82d9b855" pagesize="10">
<DataSources>
    <SharePoint:AggregateDataSource runat="server" IsSynchronous="false" SeparateRoot="true" id="New_x0020_D1_x0020_milestones5"><sources><SharePoint:SPDataSource runat="server" DataSourceMode="List" UseInternalName="true" UseServerDataFormat="true" selectcommand="&lt;View&gt;&lt;/View&gt;"><SelectParameters><asp:Parameter Name="ListID" DefaultValue="{3C2D096A-0EBC-444B-A001-1D10A58AE924}"/></SelectParameters><DeleteParameters><asp:Parameter Name="ListID" DefaultValue="{3C2D096A-0EBC-444B-A001-1D10A58AE924}"/></DeleteParameters><UpdateParameters><asp:Parameter Name="ListID" DefaultValue="{3C2D096A-0EBC-444B-A001-1D10A58AE924}"/></UpdateParameters><InsertParameters><asp:Parameter Name="ListID" DefaultValue="{3C2D096A-0EBC-444B-A001-1D10A58AE924}"/></InsertParameters></SharePoint:SPDataSource>
        <SharePoint:SPDataSource runat="server" DataSourceMode="List" UseInternalName="true" UseServerDataFormat="true" selectcommand="&lt;View&gt;&lt;/View&gt;"><SelectParameters><asp:Parameter Name="ListID" DefaultValue="{3DE02CA7-DD08-4C06-BDF3-22357774C42A}"/></SelectParameters><DeleteParameters><asp:Parameter Name="ListID" DefaultValue="{3DE02CA7-DD08-4C06-BDF3-22357774C42A}"/></DeleteParameters><UpdateParameters><asp:Parameter Name="ListID" DefaultValue="{3DE02CA7-DD08-4C06-BDF3-22357774C42A}"/></UpdateParameters><InsertParameters><asp:Parameter Name="ListID" DefaultValue="{3DE02CA7-DD08-4C06-BDF3-22357774C42A}"/></InsertParameters></SharePoint:SPDataSource>
    </sources><aggregate><concat name="data source"><datasource name="D1_Form" id="0" Type="SPList"/><datasource name="D1_Register" id="1" Type="SPList"/></concat></aggregate></SharePoint:AggregateDataSource>
</DataSources>
<ParameterBindings>
<ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
<ParameterBinding Name="ManualRefresh" Location="WPProperty[ManualRefresh]"/>
<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
<ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
<ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/>
<ParameterBinding Name="dvt_nextpagedata" Location="Postback;Connection"/>
</ParameterBindings>


<datafields>@Title,D1 Ref;@Organisation,1.0 Asset Owner;@Address_x0020_of_x0020_Asset,2.0 Street Name of Surplus Asset;@Post_x0020_Code_x0020_of_x0020_A,2.1 Post Code;@UPRN,2.3 UPRN;@XY_x0020_Co_x002d_Ordinates,2.4 XY Co-Ordinates;@Size,2.2 Area of Land (Hectares);@Name,2.15 Main Contact for Inspection;@Tel_x0020_Number_x0020__x0028_fo,2.16 Contact Tel Number;@Email_x0020__x0028_for_x0020_Ins,2.17 Contact Email;@Name_x0020_of_x0020_Legal_x0020_,5.4 Name of Occupier;@Type_x0020_of_x0020_Tenure,5.3 Type of Tenure;@Is_x0020_the_x0020_Land_x0020_Re,4.0 Is the Land Registered?;@Folio_x0020_number,2.5 Folio number(s);@Holder_x0020_of_x0020_Title_x002,4.1a Holder of Title documents;@_x0034__x002e_1a_x003a__x0020_De,6.8 Details;@_x0035__x002e_1_x003a__x0020_Dat,3.0 Date of acquisition from the private sector;@_x0035__x002e_1a_x003a__x0020_Ho,3.1 How the land was acquired;@_x0035__x002e_1b_x003a__x0020_Pu,3.2 Purpose of Acquisition;@_x0035__x002e_2_x003a__x0020_Has,3.3 Material Change;@_x0035__x002e_3_x003a__x0020_Is_,3.4 Is the Asset within Development Limits?;@_x0036__x002e_1_x003a__x0020_Nam,1.4 Authorising Officer;@_x0036__x002e_1a_x003a__x0020_Di,1.6 Asset Owner Ref.;@_x0036__x002e_1b_x003a__x0020_Ad,1.1 Asset Owner Street Name and Town;@_x0036__x002e_1c_x003a__x0020_Co,1.2 Telephone;@_x0036__x002e_1e_x003a__x0020_Ot,7.0 Other Relevant Information;@NewColumn12,D1 Status;@Acres,Site Area (Acres);@Do_x0020_you_x0020_hold_x0020_Ti,4.1 Do you hold Title Documents?;@If_x0020_Legal_x0020_has_x0020_b,4.4 Legal Team Contact Details;@D1_x0020_Form_x0020_Admin_x0020_,D1 Form Admin Status;@NewD1for,D1 form - new item created;@_x0031__x002e_3_x0020_E_x002d_Ma,1.3 E-Mail;@_x0031__x002e_9_x0020_Department,1.7 Department/Sponsor Body;@_x0031__x002e_10_x0020_Main_x002,1.8 Main Contact in Sponsor Dept or Body;@_x0032__x002e_6_x0020_Current_x0,2.6 Current Net Book Value;@_x0032__x002e_7_x0020_Date_x0020,2.7 Date Net book value provided;@_x0032__x002e_8_x0020_LPS_x0020_,2.8 LPS Valuation Required;@_x0032__x002e_9_x0020_Valuation_,2.9 Valuation within last 12 months?;@_x0032__x002e_10_x0020_Valued_x0,2.10 Valued by;@_x0032__x002e_11_x0020_Previous_,2.11 Previous LPS Case Ref;@_x0032__x002e_12_x0020_Link_x002,2.12 Link to Asset Management Plan;@_x0032__x002e_13_x0020_Year_x002,2.13 Year Capital Receipt Reqd.;@_x0032__x002e_14_x0020_Last_x002,2.14 Last Operational Use Category;@_x0032__x002e_14a_x0020_Other_x0,2.14a Other Use Category;@_x0032__x002e_18_x0020_Private_x,2.18 Private Sector Interest;@_x0032__x002e_19_x0020_Public_x0,2.19 Public Sector Interest;@_x0032__x002e_18a_x0020_Details_,2.18a Details of Private Sector Interest;@_x0032__x002e_19a_x0020_Details_,2.19a Details of Public Sector Interest;@_x0032__x002e_20_x0020_Any_x0020,2.20 Any Current/Pending Planning Decisions?;@_x0032__x002e_20a_x0020_Details_,2.20a Details of Current/Pending Planning Decisions;@Do_x0020_You_x0020_Hold_x0020_Fo,3.5 Do You Hold Former Owner details?;@_x0034__x002e_3_x0020_Do_x0020_y,4.2 Do you have a Title Report?;@_x0034__x002e_3_x0020_Has_x0020_,4.3 Has Your Legal Team Been Instructed?;@_x0035__x002e_0_x0020_Occupation,5.1 Occupation Status;@_x0035__x002e_1_x0020_Basis_x002,5.2 Basis of Occupation;@_x0035__x002e_4_x0020_Current_x0,5.5 Current Rent;@_x0035__x002e_5_x0020_Vacant_x00,5.6 Vacant Possession Date in Lease;@_x0035__x002e_6_x0020_Vacant_x00,5.7 Actual Vacant Possession Date;@_x0035__x002e_7_x0020_Annual_x00,5.8 Annual Vacant Holding Costs;@_x0035__x002e_8_x0020_Details_x0,5.9 Details of Illegal Use;@_x0036__x002e_1_x0020_Are_x0020_,6.0 Are there any Wayleaves?;@_x0036__x002e_1_x0020_Easements,6.1 Easements;@_x0036__x002e_2_x0020_Rights_x00,6.2 Rights of Way;@_x0036__x002e_3_x0020_Restrictiv,6.3 Restrictive Covenants;@_x0036__x002e_4_x0020_Rights_x00,6.4 Rights of Re-entry;@_x0036__x002e_5_x0020_Possessory,6.5 Possessory Title Claims;@_x0036__x002e_6_x0020_Reservatio,6.6 Reservations;@UpdatedD,D1 form - item updated;@_x0033__x002e_3a_x0020_Describe_,3.3a Describe the nature of the material change;@_x0031__x002e_1a_x0020_Post_x002,1.1 Asset Owner Post Code;@D1_x0020_Refernce_x0020_Number,D1 Reference Number;@_x0032__x002e_0_x0020_Town,2.0 Town;@_x0031__x002e_5_x0020_Email,1.5 Email of Submitting Officer;@_x0032__x002e_4a_x0020_E_x0020_P,2.4a E Pims Ref Number;@_x0036__x002e_7_x0020_Is_x0020_t,6.7 Is the Property a Listed Building or Scheduled Monument?;@_x0035__x002e_0_x0020_Ownership_,5.0 Ownership Details;@ID,ID;@ContentType,Content Type;@Modified,Modified;@Created,Created;@Author,Created By;@Editor,Modified By;@_UIVersionString,Version;@Attachments,Attachments;@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;@ItemChildCount,Item Child Count;@FolderChildCount,Folder Child Count;@AppAuthor,App Created By;@AppEditor,App Modified By;@D1_x0020_Status,D1 Status;@Reason_x0020_For_x0020_Rejection,Referred to Asset Owner Reason;@Related_x0020_D1,Related D1;@D1Regist,D1 Register - Item updated;@Status_x0020_Notes,Status Notes;@Current_x0020_Net_x0020_Book_x00,Current Net Book Value;@Date_x0020_of_x0020_Valuation,Date of Valuation;@NewD1Reg,D1 Register - Item created;@Trim_x0020_Reference,HPRM Reference;@CAU_x0020_AO_x0020_Case,CAU AO Case;@District_x0020_AO_x0020_Case,District AO Case;@CAU_x0020_Refernce_x0020_Number,CAU Reference Number;@D1_x0020_Reference_x0020_Number,D1 Reference Number;@Submitting_x0020_Organisation,Submitting Organisation;@EOI_x0020_Circulation,EOI Distribution List;@SubmittedBy,SubmittedBy;@Submitting_x0020_Officer,Submitting Officer;@EOI_x0020_Responses,EOI &apos;No&apos; Responses;@EOI_x0020_Respone_x003d_Yes_x002,Questionnaire circulation;@EOI_x0020_Yes_x0020_responses,EOI &apos;Yes&apos; responses;@EOI_x0020_Reminder_x0020_Date,Next_Reminder_Date;@District_x0020_Valuer,LPS Valuer;@Valuation,LPS Valuation;@Link_x0020_to_x0020_Related_x002,Link to Related D1;@Reason_x0020_for_x0020_Rejection0,Reason for Rejection;@TaskCompleteTarget,TaskCompleteTarget-EOI;@InfoSharingTaskCompleteTarget,TaskCompleteTarget-InfoSharing;@QuestionnaireTaskCompleteTarget,TaskCompleteTarget-Questionnaire;@EOI_x0020_Response_x0020_Target,EOI Response Target;@Questionnaire_x0020_Response_x00,Questionnaire Response Target;@Questionnaire_x0020_Qualifying_x,Questionnaire Qualifying Response Target;@Sale_x0020_to_x0020_Central_x002,Sale to Central Dept (inc ALBs etc.);@Sale_x0020_to_x0020_Council,Sale to Council;@Sale_x0020_to_x0020_HA_x0020_for,Sale to HA for Social Housing;@Sale_x0020_to_x0020_HA_x0020_For0,Sale to HA for Affordable Housing;@Sale_x0020_as_x0020_CAT,Sale as CAT;@Purchaser,Purchaser;@Sale_x0020_to_x0020_Adjacent_x00,Sale to Adjoining Owner;@Sale_x0020_to_x0020_Former_x0020,Sale to Former Owner;@Sale_x0020_on_x0020_Open_x0020_M,Sale on Open Market;@Pathway_x0020_Decision_x0020_Not,Pathway Decision Notes;@Date_x0020_of_x0020_Meeting,Date of Meeting;@Purpose_x0020_of_x0020_Meeting,Purpose of Meeting;@Date_x0020_of_x0020_Technical_x0,Date of Technical Due Diligence;@Date_x0020_Planning_x0020_Expect,Date Planning Expected;@Date_x0020_Planning_x0020_Achiev,Date Planning Achieved;@Date_x0020_Business_x0020_Plan_x,Date Purchaser&apos;s Business Plan Expected;@Date_x0020_Business_x0020_Plan_x0,Date Purchaser&apos;s Business Plan Achieved;@Date_x0020_of_x0020_Council_x002,Date of Council Meeting;@Date_x0020_Full_x0020_Funding_x0,Date Full Funding Expected;@Date_x0020_Legals_x0020_Instruct,Date legals instructed for completion;@Date_x0020_of_x0020_Agreed_x0020,Date of Agreed Completion;@Sale_x0020_Agreed_x0020_Figure_x,Sale Agreed Figure (GBP);@Sale_x0020_Figure,Completed Sale Value (GBP);@Date_x0020_Withdrawn,Date Withdrawn;@Date_x0020_Completed,Date Sale Completed;@Date_x0020_Agent_x0020_Appointed,Date Agent Appointed;@Date_x0020_Marketing_x0020_Start,Date Marketing Started;@Current_x0020_Highest_x0020_Bid,Current or Highest Bid;@Next_x0020_Review_x0020_Date,Review Date;@D1_x0020_Approved_x0020_date,D1_Approved_Date;@D1_EOI_Date,D1_EOI_Date;@D1_Questionnaire_Date,D1_Issue_Questionnaire_Date;@D1_Q_Published_Date,D1_Release_Questionnaire_Date;@D1_Rejected_Date,D1_Rejected_Date;@D1_NilCirc_Date,D1_NilCirc_Date;@Milestones,Milestones;@Technical_x0020_Due_x0020_Dillig,Technical Due Dilligence Notes;@Date_x0020_Asset_x0020_Owners_x0,Date Asset Owners Business Plan Expected for CAT;@Date_x0020_Asset_x0020_Owner_x00,Date Asset Owner&apos;s Business Plan Achieved for CAT;@Date_x0020_Full_x0020_funding_x00,Date Full funding Achieved;@Date_x0020_Sale_x0020_Agreed,Date Sale Agreed;@Date_x0020_of_x0020_Current_x002,Date of Current or Highest Bid/Offer;@Date_x0020_of_x0020_Closure_x002,Date of Closure of Bids/Offers;@Address,Address;</datafields>

<XSL>
<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="ManualRefresh"></xsl:param>
<xsl:param name="dvt_firstrow">1</xsl:param>
<xsl:param name="dvt_nextpagedata" />
<xsl:variable name="dvt_1_automode">0</xsl:variable>

<xsl:template match="/" xmlns:xs="http://www.w3.org/2001/XMLSchema" 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:choose>
        <xsl:when test="($ManualRefresh = 'True')">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td valign="top">
                        <xsl:call-template name="dvt_1"/>
                    </td>
                    <td width="1%" class="ms-vb" valign="top">
                        <img src="/_layouts/15/images/staticrefresh.gif" id="ManualRefresh" border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}" alt="Click here to refresh the dataview."/>
                    </td>
                </tr>
            </table>
        </xsl:when>
        <xsl:otherwise>
            <xsl:call-template name="dvt_1"/>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>

<xsl:template name="dvt_1">
    <xsl:variable name="dvt_StyleName">Table</xsl:variable>
    <xsl:variable name="Rows" select="/dsQueryResponse"/>
    <xsl:variable name="dvt_RowCount" select="count($Rows)"/>
    <xsl:variable name="RowLimit" select="10" />
    <xsl:variable name="FirstRow" select="$dvt_firstrow" />
    <xsl:variable name="LastRow">
        <xsl:choose>
            <xsl:when test="($FirstRow + $RowLimit - 1) &gt; $dvt_RowCount"><xsl:value-of select="$dvt_RowCount" /></xsl:when>
            <xsl:otherwise><xsl:value-of select="$FirstRow + $RowLimit - 1" /></xsl:otherwise>
        </xsl:choose>
    </xsl:variable>
    <xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" />
    <xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/>

    <xsl:choose>
        <xsl:when test="$dvt_IsEmpty">
            <xsl:call-template name="dvt_1.empty"/>
        </xsl:when>
        <xsl:otherwise>
            <table border="0" width="100%" cellpadding="2" cellspacing="0">
                <tr valign="top">
                    <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
                        <th class="ms-vh" width="1%" nowrap="nowrap"></th>
                    </xsl:if>
                    <th class="ms-vh" nowrap="nowrap">Row</th>
                    <th class="ms-vh" nowrap="nowrap">Milestones</th>
                </tr>
                <xsl:call-template name="dvt_1.body">
                    <xsl:with-param name="Rows" select="$Rows[position() &gt;= $FirstRow and position() &lt;= $LastRow]"/>
                    <xsl:with-param name="FirstRow" select="1" />
                    <xsl:with-param name="LastRow" select="$dvt_RowCount" />
                </xsl:call-template>
            </table>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:call-template name="dvt_1.commandfooter">
        <xsl:with-param name="FirstRow" select="$FirstRow" />
        <xsl:with-param name="LastRow" select="$LastRow" />
        <xsl:with-param name="RowLimit" select="$RowLimit" />
        <xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" />
        <xsl:with-param name="RealLastRow" select="number(ddwrt:NameChanged('',-100))" />
    </xsl:call-template>
</xsl:template>
<xsl:template name="dvt_1.body">
    <xsl:param name="Rows"/>
    <xsl:param name="FirstRow" />
    <xsl:param name="LastRow" />
    <xsl:for-each select="$Rows">
        <xsl:variable name="dvt_KeepItemsTogether" select="false()" />
        <xsl:variable name="dvt_HideGroupDetail" select="false()" />
        <xsl:if test="(position() &gt;= $FirstRow and position() &lt;= $LastRow) or $dvt_KeepItemsTogether">
            <xsl:if test="not($dvt_HideGroupDetail)" ddwrt:cf_ignore="1">
                <xsl:call-template name="dvt_1.rowview" />
            </xsl:if>
        </xsl:if>
    </xsl:for-each>

</xsl:template>
<xsl:template name="dvt_1.rowview">
    <tr>
        <xsl:if test="position() mod 2 = 1">
            <xsl:attribute name="class">ms-alternating</xsl:attribute>
        </xsl:if>
        <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
            <td class="ms-vb" width="1%" nowrap="nowrap">
                <span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span>
            </td>
        </xsl:if>
        <td class="ms-vb">
            <xsl:call-template name="dvt_2"/>
        </td>
        <td class="ms-vb">
            <xsl:call-template name="dvt_3"/>
        </td>
    </tr>
</xsl:template>
<xsl:template name="dvt_1.empty">
    <xsl:variable name="dvt_ViewEmptyText">There are no items to show in this view.</xsl:variable>
    <table border="0" width="100%">
        <tr>
            <td class="ms-vb">
                <xsl:value-of select="$dvt_ViewEmptyText"/>
            </td>
        </tr>
    </table>
</xsl:template>
<xsl:variable name="dvt_2_automode">0</xsl:variable>
<xsl:template name="dvt_2">
    <xsl:variable name="dvt_StyleName">Table</xsl:variable>
    <xsl:variable name="Rows" select="D1_Form/Rows/Row"/>
    <xsl:variable name="dvt_RowCount" select="count($Rows)"/>
    <xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/>
    <xsl:choose>
        <xsl:when test="$dvt_IsEmpty">
            <xsl:call-template name="dvt_2.empty"/>
        </xsl:when>
        <xsl:otherwise>
            <table border="0" width="100%" cellpadding="2" cellspacing="0">
                <tr valign="top">
                    <xsl:if test="$dvt_2_automode = '1'" ddwrt:cf_ignore="1">
                        <th class="ms-vh" width="1%" nowrap="nowrap"></th>
                    </xsl:if>
                </tr>
                <xsl:call-template name="dvt_2.body">
                    <xsl:with-param name="Rows" select="$Rows"/>
                </xsl:call-template>
            </table>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>

<xsl:template name="dvt_2.body">
    <xsl:param name="Rows"/>
    <xsl:for-each select="$Rows">
        <xsl:call-template name="dvt_2.rowview"/>
    </xsl:for-each>
</xsl:template>

<xsl:template name="dvt_2.rowview">
    <tr>
        <xsl:if test="position() mod 2 = 1">
            <xsl:attribute name="class">ms-alternating</xsl:attribute>
        </xsl:if>
        <xsl:if test="$dvt_2_automode = '1'" ddwrt:cf_ignore="1">
            <td class="ms-vb" width="1%" nowrap="nowrap">
                <span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span>
            </td>
        </xsl:if>
        <td class="ms-vb">
            <xsl:value-of select="@Title"/>
        </td>
        <td class="ms-vb">
            <xsl:value-of select="@NewColumn12"/>
        </td>
        <td class="ms-vb">
            <xsl:value-of select="@Address_x0020_of_x0020_Asset"/>
        </td>
        <td class="ms-vb">
            <xsl:value-of select="@_x0032__x002e_0_x0020_Town"/>
        </td>
        <td class="ms-vb">
            <xsl:value-of select="@Post_x0020_Code_x0020_of_x0020_A"/>
        </td>
    </tr>
</xsl:template>

<xsl:template name="dvt_2.empty" 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">
    <xsl:variable name="dvt_ViewEmptyText"></xsl:variable>
    <table border="0" width="100%">
        <tr>
            <td class="ms-vb">
                <xsl:value-of select="$dvt_ViewEmptyText"/>
            </td>
        </tr>
    </table>
</xsl:template>
<xsl:variable name="dvt_3_automode">0</xsl:variable>
<xsl:template name="dvt_3">
    <xsl:variable name="dvt_StyleName">Table</xsl:variable>
    <xsl:variable name="Rows" select="D1_Register/Rows/Row"/>
    <xsl:variable name="dvt_RowCount" select="count($Rows)"/>
    <xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/>
    <xsl:choose>
        <xsl:when test="$dvt_IsEmpty">
            <xsl:call-template name="dvt_3.empty"/>
        </xsl:when>
        <xsl:otherwise>
            <table border="0" width="100%" cellpadding="2" cellspacing="0">
                <tr valign="top">
                    <xsl:if test="$dvt_3_automode = '1'" ddwrt:cf_ignore="1">
                        <th class="ms-vh" width="1%" nowrap="nowrap"></th>
                    </xsl:if>
                </tr>
                <xsl:call-template name="dvt_3.body">
                    <xsl:with-param name="Rows" select="$Rows"/>
                </xsl:call-template>
            </table>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>

<xsl:template name="dvt_3.body">
    <xsl:param name="Rows"/>
    <xsl:for-each select="$Rows">
        <xsl:call-template name="dvt_3.rowview"/>
    </xsl:for-each>
</xsl:template>

<xsl:template name="dvt_3.rowview">
    <tr>
        <xsl:if test="position() mod 2 = 1">
            <xsl:attribute name="class">ms-alternating</xsl:attribute>
        </xsl:if>
        <xsl:if test="$dvt_3_automode = '1'" ddwrt:cf_ignore="1">
            <td class="ms-vb" width="1%" nowrap="nowrap">
                <span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span>
            </td>
        </xsl:if>
        <td class="ms-vb">
            <xsl:value-of select="@Milestones"/>
        </td>
    </tr>
</xsl:template>

<xsl:template name="dvt_3.empty" 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">
    <xsl:variable name="dvt_ViewEmptyText"></xsl:variable>
    <table border="0" width="100%">
        <tr>
            <td class="ms-vb">
                <xsl:value-of select="$dvt_ViewEmptyText"/>
            </td>
        </tr>
    </table>
</xsl:template>
<xsl:template name="dvt_1.commandfooter">
    <xsl:param name="FirstRow" />
    <xsl:param name="LastRow" />
    <xsl:param name="RowLimit" />
    <xsl:param name="dvt_RowCount" />
    <xsl:param name="RealLastRow" />
    <table cellspacing="0" cellpadding="4" border="0" width="100%">
        <tr>
            <xsl:if test="$FirstRow &gt; 1 or $LastRow &lt; $dvt_RowCount">
                <xsl:call-template name="dvt_1.navigation">
                    <xsl:with-param name="FirstRow" select="$FirstRow" />
                    <xsl:with-param name="LastRow" select="$LastRow" />
                    <xsl:with-param name="RowLimit" select="$RowLimit" />
                    <xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" />
                    <xsl:with-param name="RealLastRow" select="$RealLastRow" />
                </xsl:call-template>
            </xsl:if>
        </tr>
    </table>
</xsl:template>
<xsl:template name="dvt_1.navigation">
    <xsl:param name="FirstRow" />
    <xsl:param name="LastRow" />
    <xsl:param name="RowLimit" />
    <xsl:param name="dvt_RowCount" />
    <xsl:param name="RealLastRow" />
    <xsl:variable name="PrevRow">
        <xsl:choose>
            <xsl:when test="$FirstRow - $RowLimit &lt; 1">1</xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$FirstRow - $RowLimit" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:variable>
    <xsl:variable name="LastRowValue">
        <xsl:choose>
            <xsl:when test="$LastRow &gt; $RealLastRow">
                <xsl:value-of select="$LastRow"></xsl:value-of>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$RealLastRow"></xsl:value-of>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:variable>
    <xsl:variable name="NextRow">
        <xsl:value-of select="$LastRowValue + 1"></xsl:value-of>
    </xsl:variable>
    <td nowrap="nowrap" class="ms-paging" align="right">
        <xsl:if test="$dvt_firstrow &gt; 1" ddwrt:cf_ignore="1">
            <a>
            <xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent('dvt_firstrow={1}')" />;</xsl:attribute>
            Start</a>
            <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
            <a>
            <xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$PrevRow,'}'))" />;</xsl:attribute>
            <img src="/_layouts/15/images/prev.gif" border="0" alt="Previous" />
            </a>
            <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
        </xsl:if>
        <xsl:value-of select="$FirstRow" />
         - <xsl:value-of select="$LastRowValue" />
        <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
        <xsl:if test="$LastRowValue &lt; $dvt_RowCount or string-length($dvt_nextpagedata)!=0" ddwrt:cf_ignore="1">
            <a>
            <xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$NextRow,'}'))" />;</xsl:attribute>
            <img src="/_layouts/15/images/next.gif" border="0" alt="Next" />
            </a>
        </xsl:if>
    </td>
</xsl:template>
</xsl:stylesheet>   </XSL>
</WebPartPages:DataFormWebPart>
2
  • please share your XSLT code Feb 27, 2018 at 10:49
  • @ArsalanAdamKhatri I've added the code as requested Feb 27, 2018 at 11:39

1 Answer 1

0

The problem seems to be here:

<tr valign="top">
   <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
       <th class="ms-vh" width="1%" nowrap="nowrap"></th>
   </xsl:if>
   <th class="ms-vh" nowrap="nowrap">Row</th>
   <th class="ms-vh" nowrap="nowrap">Milestones</th>
</tr>

You should have as many <th>'s as the numebr of <td>'s in any specific row.

So if you change it with the following, you should see the desired result:

<tr valign="top">
    <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
        <th class="ms-vh" width="1%" nowrap="nowrap"></th>
    </xsl:if>
    <th class="ms-vh" nowrap="nowrap">Row</th>
    <th class="ms-vh" nowrap="nowrap">NewColumn12</th>
    <th class="ms-vh" nowrap="nowrap">Address of Asset</th>
    <th class="ms-vh" nowrap="nowrap">Town</th>
    <th class="ms-vh" nowrap="nowrap">Post Code</th>
    <th class="ms-vh" nowrap="nowrap">Milestones</th>
</tr>

NOTE: Change the column names as you desire.

1
  • Once I tried this solution, it simply added empty columns onto the end of my table. I think the problem is that the data of view one is being registered under a single column, 'Row' and the data of view two is being registered under 'Milestone' which is correct. Feb 27, 2018 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.