2 Replies Latest reply: Jun 18, 2010 5:55 AM by selcuk45 RSS

    Change number format via expression?

      Hi;

      I would like to change number format and font via edit expression mode.

      how can i do it?

       

      Thanks in advance...

        • Change number format via expression?

          You can change the number format using something like this:

           

          =Num ( YourNumberValueField , '#,##0.00;(#,##0.00);-' )


          The string that you use for the number format is pretty standard so I'm sure you can work out all the options you have there, one warning though, if your end-users do a lot of exporting to excel of this data, using the above formatting means that number formatting in excel will be removed.

          I use a variable in place of the '#,##0.00' string, which then allows me to give buttons to the end-users so they can change decimal places etc, those buttons just change the variable.

          As for changing the font in the same expression, no, I don't think it's possible. You can create expressions underneath the main expression that allows you to control the format and colour of the text, but not the font itself.