Printing parameter values in Excel Template when All is selected

 Hi Everyone,


In this post let us see how we can show values in Excel Output when parameter value is empty.

We dont get any value in parameter when we select All values in the Report and in the report All is linked with Null Values.

Let us see sample XML

<?xml version='1.0' encoding='utf-8'?>

<DATA_DS><BU/>

<G_1>

<INVOICE_NUMBER>1</INVOICE_NUMBER><BUSINESS_UNIT>test1</BUSINESS_UNIT>

</G_1>

</DATA_DS>


If we see above xml data BU tag dont have any value.

Let us see how we can we handle this in Excel Template.

<xsl:choose>

        <xsl:when test="DATA_DS/BU!="">

            <xsl:value-of select="DATA_DS/BU"/>

        </xsl:when>

        <xsl:otherwise>Print required value

        </xsl:otherwise>

</xsl:choose>


Above code checks if BU value not equal to Null.

 <xsl:when test="DATA_DS/BU!="">

If it is not equal to Null, then prints Bu value

<xsl:value-of select="DATA_DS/BU"/>

If it is Null, then print whatever value we need

<xsl:otherwise>Print required value

No comments:

Post a Comment

Add Barcode in oracle fusion Reports

 Hi Everyone, In this post let us see how to add Barcode in Oracle Fusion RTF Templates and setups to be done to reflect in the report outpu...