0

I want to show this row on the base of last page only. If the page number is last one then this row should be displayed in table otherwise not.Only the last page should display this total section.

Code:

 <xsl:choose>
     <xsl:when test="position() = last()">
       <fo:table-row border-width="4px" border-style="solid" font-family="Arial">
        <fo:table-cell border-width="1px" border-style="solid">
          <fo:block font-size="11pt" text-align="left" />
        </fo:table-cell>
        <fo:table-cell font-weight="bold" border-width="1px" border-style="solid" font-family="Arial">
          <fo:block font-size="11pt" text-align="right">
     Total
    </fo:block>
        </fo:table-cell>
        <fo:table-cell border-width="1px" border-style="solid" font-family="Segoe UI">
            <fo:block font-size="11pt" text-align="center">

                           <xsl:value-of select="last()" />
          </fo:block>
        </fo:table-cell>
      </fo:table-row>
    </xsl:when>
     <xsl:otherwise>

     </xsl:otherwise>
   </xsl:choose>

But this did not work because last and position works only on nodes.I have tried to add the the fo:page-number in variable but it won't work also.

Techgeeks1
  • 556
  • 1
  • 4
  • 18
  • Are you asking something like this: https://stackoverflow.com/questions/13299809/how-to-detect-the-last-page-of-the-document/13608366#13608366 OR https://stackoverflow.com/questions/12615310/determining-last-page-position-in-xsl-fo ? – Vebbie May 08 '19 at 08:59
  • Hi, @Vebbie i have tried these but i want the fo page no in condion so that i can display my row based on the condition. e.g If(pageno=lastpage){then display row} – Techgeeks1 May 08 '19 at 09:29
  • Hi Techgeeks1, Did you resolve this issue? – kieuanhvu Nov 05 '21 at 08:07

0 Answers0