Removing decimal place from amount field

  • I'm using Report Builder 3.0 to try and create a bank report.

    One of the fields I have to include in the report is the check amount. But the bank requires the amount to have two implied decimal places. I used the REPLACE(CheckAmt.Value,".","") to replace the decimals with nothing. But when I do this, Report Builder adds an extra zero to the end. So what I’d like to do now is use some soft of LEFT() function or something to get everything but the last trailing zero.

    Does that path make sense? or should I go about this a different way?

  • machzy - Tuesday, July 17, 2018 5:35 AM

    I'm using Report Builder 3.0 to try and create a bank report.

    One of the fields I have to include in the report is the check amount. But the bank requires the amount to have two implied decimal places. I used the REPLACE(CheckAmt.Value,".","") to replace the decimals with nothing. But when I do this, Report Builder adds an extra zero to the end. So what I’d like to do now is use some soft of LEFT() function or something to get everything but the last trailing zero.

    Does that path make sense? or should I go about this a different way?

    Have you tried multiplying by 100, truncating and converting to integer?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Luis Cazares - Tuesday, July 17, 2018 6:33 AM

    machzy - Tuesday, July 17, 2018 5:35 AM

    I'm using Report Builder 3.0 to try and create a bank report.

    One of the fields I have to include in the report is the check amount. But the bank requires the amount to have two implied decimal places. I used the REPLACE(CheckAmt.Value,".","") to replace the decimals with nothing. But when I do this, Report Builder adds an extra zero to the end. So what I’d like to do now is use some soft of LEFT() function or something to get everything but the last trailing zero.

    Does that path make sense? or should I go about this a different way?

    Have you tried multiplying by 100, truncating and converting to integer?

    You're so smart! That worked! Thanks so much!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply