xml - How do I use an xdoxslt variable inside xsl code, in BI Publisher? -
i trying create loop increments variable, use variable inside of xsl code. here code using increment counter:
<?xdoxslt:set_variable($_xdoctx, ‘counter’, 0)?> <?for-each-group:$g2;./status?> <?sort:current-group()/status;'ascending';data-type='text'?> <?xdoxslt:set_variable($_xdoctx, ‘counter’, xdoxslt:get_variable($_xdoctx, ‘counter’) + count(xdoxslt:distinct_values(current-group()/action)))?> <?end for-each-group?>
the following code output number need:
<xsl:value-of select="xdoxslt:get_variable($_xdoctx, ‘counter’)"/>
so know loop working , variable has correct number. however, need use variable in following code:
<xsl:attribute name="number-rows-spanned" xdofo:ctx="block"> <xsl:value-of select="xdoxslt:get_variable($_xdoctx, ‘counter’)"/> </xsl:attribute>
when use code following error:
java.lang.numberformatexception: input string: ""
i have tried:
<xsl:variable name="rowcount" select="xdoxslt:get_variable($_xdoctx, ‘counter’)"/> <xsl:attribute name="number-rows-spanned" xdofo:ctx="block"> <xsl:value-of select="$rowcount"/> </xsl:attribute>
this results in same error. there workaround allow me use variable in way or should find alternate solution?
this report trying create:
group column1 group column2 column3 | column4 | column5 | column6 group left | group left | group left | number end group column2 totals column3 | column4 | column5 | column6 group left | group left | group left | sum() end group column1
the problem in "totals" table, column6 values being split when there more 1 column2 in grouping.
i found workaround, prefer more elegant solution @ least works. did made last column "ghost" column (no field , no borders). inserted table 2 columns column5. tags placed before , after table. in table put value column5, , sum needed in column6. it's not perfect, there small formatting issues. prefer better solution, if has suggestions.
Comments
Post a Comment