Method Community

 

Report designer expanding decimal places

Last post 01-06-2012 1:09 PM by Andy K. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-06-2012 12:44 PM

    Report designer expanding decimal places

    We have a few items where it is necessary for us to invoice the Unit price down to fractions of a penny. So for example, $0.0243 per gram and $0.01856 per gram. This works fine within Method since we can go as many decimal places as we need in that field, but when we print the invoice in report designer, it rounds to $0.02 for both scenarios. It's just a handful of items that require this, so we still want two decimal places to show up as the default when we print in all other cases.

    Question: Is it possible in report designer to format the label for Unit Price so that it expands if the field has more than 2 decimal places, but reverts to the default of 2 decimal places if the number in the field has 2 or less decimal places?

    Thanks,
    Andy

  • 01-06-2012 12:59 PM In reply to

    Re: Report designer expanding decimal places

    Answer

    Andy-

    You can use a format string like the following {0:#.00###}

    This will show at least 2 decimal but up to 5 if needed.

    -Michael

    Michael Melo
    Product Manager
    Method Integration Inc.
    Website: http://www.method.me
    LinkedIn: http://www.linkedin.com/in/MichaelMelo
  • 01-06-2012 1:05 PM In reply to

    Re: Report designer expanding decimal places

    Andy-

    One last detail-

    If you want a $ use {0:$#.00###}

    -Michael

    Michael Melo
    Product Manager
    Method Integration Inc.
    Website: http://www.method.me
    LinkedIn: http://www.linkedin.com/in/MichaelMelo
  • 01-06-2012 1:09 PM In reply to

    Re: Report designer expanding decimal places

    Beautiful. Thank you, Michael.

Page 1 of 1 (4 items)