Oracle Analytics Publisher

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Custom Report error out due to input string ending with "."

Received Response
31
Views
3
Comments

Hi -

We have a custom report which uses XSL Stylesheet which errors out due to input string ending with "." which is a valid value. I would like to ask how we can modify the script below to be able to parse the input string.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="/">
<DATA_DS>
<xsl:variable name="var_size" select="63000"/>
<xsl:for-each select="/DATA_DS/G_1">
<xsl:variable name="var_pos" select="position()"/>
<xsl:variable name="var_mod" select="$var_pos mod($var_size)"/>
<xsl:if test="$var_mod = 1">
<xsl:variable name="var_groupNum" select="($var_pos - $var_mod) div number($var_size) + 1"/>
<xsl:element name="CountGroup">
<xsl:attribute name="name">
<xsl:value-of select="concat('Journal', $var_groupNum)"/>
</xsl:attribute>
<xsl:for-each select="/DATA_DS/G_1[position() > ($var_pos -1) and position() < ($var_pos + $var_size)]">
<xsl:copy-of select="."/>
</xsl:for-each>
<xsl:for-each select="/DATA_DS/G_2">
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:element>
</xsl:if>
</xsl:for-each>
</DATA_DS>
</xsl:template>
</xsl:stylesheet>

Answers

  • Mallikarjuna Kuppauru-Oracle
    Mallikarjuna Kuppauru-Oracle Rank 8 - Analytics Strategist

    Hi @jhaira_18

    What Error are you getting while running the report?

    Regards,

    Arjun

  • jhaira_18
    jhaira_18 Rank 1 - Community Starter

    Hi Arjun -

    Below is the error we got in running the report:

    The report cannot be rendered because on an error, please contact the administrator.

    For input string: "111849E-5."

    Thanks,

    jhaira

  • Kevin M-Oracle
    Kevin M-Oracle Rank 6 - Analytics Lead

    You can use the Template Viewer that comes with the Publisher desktop to test your

    XSL template.

    You can also build an RTF and then Export to XSL-FO.

    Rgds,

    Kevin