This discussion is archived
6 Replies Latest reply: Jan 17, 2013 9:13 PM by Harry534 RSS

How To Restrict Number Of Rows For Multiple Group In Report Output

Harry534 Newbie
Currently Being Moderated
Hi ,

I have a requirement to restrict number of rows in report output.I have three different group , if i use same no of rows to restrict then output is as expected but if i want Deduction group should have 7 rows , earning should have 5 rows and Tax group have 3 rows in report output then XML tag is not working.

Below is the XML tag i am using -

First i have declare the variable to restrict the rows -
<xsl:variable name="lpp" select="number(7)"/>
<xsl:variable name="lpp1" select="number(5)"/>
<xsl:variable name="lpp2" select="number(3)"/>

For Each -
<xsl:variable xdofo:ctx="incontext" name="DedLines" select=".//AC_DEDUCTIONS"/>
<xsl:variable xdofo:ctx="incontext" name="EarLines" select=".//AC_EARNINGS[ELEMENT_CLASSIFICATION!='Taxable Benefits']"/>
<xsl:variable xdofo:ctx="incontext" name="EarTaxLines" select=".//AC_EARNINGS[ELEMENT_CLASSIFICATION='Taxable Benefits']>

<?for-each:$DedLines?><?if:(position()-1) mod $lpp=0?> <xsl:variable name="start" xdofo:ctx="incontext" select="position()"/>
<?if:(position()-1) mod $lpp1=0?><xsl:variable name="start1" xdofo:ctx="incontext" select="position()"/
<?if:(position()-1) mod $lpp2=0?><xsl:variable name="start2" xdofo:ctx="incontext" select="position()"/>

Report output is tabular form (one page has two column - Earning and Deduction ) . Tax group comes below earning group.

Deduction Group -
<?for-each-group:$DedLines;./REPORTING_NAME?><?if:position()>=$start and position()<$start+$lpp?>
<?end if?><?end for-each-group?>

Earning Group -
<?for-each-group:$EarLines;./REPORTING_NAME?><?if:position()>=$start1 and position()<$start1+$lpp1?>
<?end if?><?end for-each-group?>

Tax Group -
<?for-each-group:$EarTaxLines;./REPORTING_NAME?><?if:position()>=$start2 and position()<$start2+$lpp2?>
<?end if?><?end for-each-group?>

Please let me know in case additional detail is require.

Thanks in Advance.


Edited by: Harsh.rkg on Jan 14, 2013 9:43 PM


  • Correct Answers - 10 points
  • Helpful Answers - 5 points