Currency and percentage Formater not working

Posted by: jatrules07 on 3 August 2017, 3:21 pm EST

  • Posted 3 August 2017, 3:21 pm EST

    I am working with the XML data source.
    I am formatting the properties of  fields inside the table designed in the data set to- " currency " - ' c '.

    But on runtime the data is still not formatted and shows up as following. Here I am setting  formatting property of the Field2 to Currency -C .
    Field 1     Field 2
    ABC        25466
    ABB        32456

    but it should be as following if it would have worked.
    <u><b>Desired Output</b></u>
    Field 1     Field 2
     ABC        $25,466
     ABB        $32,456

    Also would like to state that I tried on the sample data source it works fine, but when I am passing the  XML data source( as XMLProvider). Then only these format properties are not working.

    Please advice how to obtain the : <u><b>Desired Output</b></u> .


  • Replied 3 August 2017, 3:21 pm EST

    By default the values coming out of the XPath expressions will be strings, so setting a format on the textboxes displaying them will have no effect.

    What you need to do is change your field's XPath query to use the number XPath function, like: number(data5)

    where "data5" is my original xpath query.

    This results in a number being returned back to the data manager and then the formatting codes will work on it.

  • Replied 3 August 2017, 3:21 pm EST

    Thanks James,
    It worked for me, but for the fields where I have passed no input value or their is no data for that column,
    the output is printing as, " NaN " rather than $0.
    I tried in the Properties Value field using the condition operations, etc., but they did not helped either.

    Please advice.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels