Method Community

 

Report Designer Not Formatting Money Field Correctly

Last post 12-16-2015 3:22 PM by Method_Loi. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-15-2015 10:09 PM

    Report Designer Not Formatting Money Field Correctly

    Hello,

    Today we noticed that our customer estimate report was showing the price for one of the line items as $641.66333. The other line items all were displayed correclty with 2 decimal places but all of these ended in 00 (such as $1100.00). I thought it had to do with the formatting in the report design, but the format for the field is set correctly to {0:$0.00}. I tried different formats but they did not effect how the number was displayed. When I set the fomatting to {0:#.00} the dollar sign was still printed and the 5 decimal places still printed on the one line item. I made sure there were no scripts in the report and then tried it with the default "Simple Estimate" report. I had the same formatting issue with the stock report. The field being displayed incorrectly is [EstimateLine.Estimate.Rate] which is a "Money" field. It look like the formatting in the report designedr is being ignored when being applied to this type of field when it has more than two decimal places. Any ideas on why this is happening?

    --Aaron

  • 12-16-2015 9:16 AM In reply to

    Re: Report Designer Not Formatting Money Field Correctly

    I was wrong...there was in fact a script being applied to the field in order to calculate the price of the item. The formatting was hard coded into the script. I updated the format to "c" in the script which is the standard format for currency and it works fine now. I will paste the line below in case others find it helpful. Sorry for any confusion.

    Replaced:

    xrItemPrice.Text = Microsoft.VisualBasic.Format(xrItemAmount.Text / xrItemQuantity.Text,"$#,##0.00###")

    With

    xrItemPrice.Text = Microsoft.VisualBasic.Format(xrItemAmount.Text / xrItemQuantity.Text,"c")

  • 12-16-2015 3:22 PM In reply to

    Re: Report Designer Not Formatting Money Field Correctly

    Hey Aaron,

    That's great news that you were able to figure the formatting out.

    -- Loi

    Loi Nguyen
    Community Support Specialist
    Method:CRM
    l.nguyen@method.me
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
Page 1 of 1 (3 items)