web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

How to show cheque amount in words for cents

(0) ShareShare
ReportReport
Posted on by 1,070

I would like to know how can i show the cheque amount for cents to be shown in words instead of numbers.

I am using the report writer function RW_ConvertToWordsAndNumbers(). However, the results is showing me,

Example:- 120.50 shown as "one hundred twenty dollars and 50 cents"

I want it to show as "one hundred twentry dollars and fifty cents" in report writer.

Appreciate if anyone could tell me how to get the above result using report writer.

Thank you.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,065 Most Valuable Professional on at
    RE: How to show cheque amount in words for cents

    Have a look at my blog posts

    blogs.msdn.microsoft.com/.../rw-getting-rw_converttowordsandnumbers-to-show-cents-in-words

    blogs.msdn.microsoft.com/.../hybrid-cheque-amount-in-words-example

    David

  • Community Member Profile Picture
    on at
    RE: How to show cheque amount in words for cents

    Dear Leslie,

    I tried to use function RW_ConvertToWordsAndNumbers( 1234.56   ""   2 )  in GP2015 R2 in Check with stub on Top report in Fabrikam, I am getting error "EXCEPTION_CLASS_SCRIPT_OUT_OF_RANGE. SCRIPT_CMD_POWER". Please help

    .Report_5F00_error.jpg

    Thanks,

    Siva

  • Suggested answer
    L Vail Profile Picture
    65,271 on at
    RE: How to show cheque amount in words for cents

    Hi,

    If you are using GP 2013 R2, you need to use the User Defined Function named RW_ConvertToWordsAndNumbers()

    David Musgrave modified these functions to include exactly what you are looking for.

    Below are the functions pertaining to converting numbers to words. I posted an article about all of the functions he changed on my blog here:

    dynamicsconfessions.blogspot.com/.../gp-2013-r2-updates-to-report-writer.html

    RW_ConvertToWordsAndNumbers()

    • Added new mode to support full conversion of dollars and cents to words. The Mode (third) parameter now supports the following three values:

    0 = Whole Number in words, Parts in numbers

    1 = Whole Number in numbers, Parts in numbers

    2 = Whole Number in words, Parts in words *NEW

    RW_ConvertToWordsAndNumbersParse()

    • Added new mode to support full conversion of dollars and cents to words. The Mode (third) parameter now supports the following three values:

    0 = Whole Number in words, Parts in numbers

    1 = Whole Number in numbers, Parts in numbers

    2 = Whole Number in words, Parts in words *NEW Here are some examples of the RW_ConvertToWordsAndNumbers() function in action:

    •RW_ConvertToWordsAndNumbers( 1234.56   ""   0 )

    One Thousand Two Hundred Thirty Four Dollars and 56 Cents

    •RW_ConvertToWordsAndNumbers( 1234.56   ""   1 ) returns

    ** 1,234 Dollars and 56 Cents

    •RW_ConvertToWordsAndNumbers( 1234.56   ""   2 ) returns

    One Thousand Two Hundred Thirty Four Dollars and Fifty Six Cents (the above function is incredible; it’s one we’ve wanted for years!)

  • Community Member Profile Picture
    on at
    RE: How to show cheque amount in words for cents

    Hi Soma,

    Thanks for your help.  I finally happened to find the resolution just after I posted this comment.

    And, for anyone else that happens across this issue below is the resolution.  Although I set this company up using a Currency template settings units seems to have been installed in reverse order.  Once modified the process works.

  • Suggested answer
    soma Profile Picture
    24,410 on at
    RE: How to show cheque amount in words for cents

    I need time to check this report. So, I will check and update you once get free time.

    Hope this helps!!!

  • Community Member Profile Picture
    on at
    RE: How to show cheque amount in words for cents

    Hi Somakar,

    I've been successful using your method on a normal check.  However, I have been trying to use the same process on a Finance>Transaction>Miscellaneous Check  without any success.  I continuannly receive a "String operation not allowed" on step 15.  I've broken out all the steps individually and found there is an inherrent problem with the initial conversion in step 8 AmtInWrd1.  The number Conversion seems to be inverted (see below) and cannot convert correctly based on your rules.

    I've read that this may be caused by incorrect currency setting on the workstations (BTW -- I'm using Web UI).  But, this affect happens on both Web and PC UI.    I've looked at all the Currency types on all the workstations and they all seem to be fine.  Would you have ideas on how to resolve this issue?

     

    Thanks,

    Gus

     

  • soma Profile Picture
    24,410 on at
    RE: How to show cheque amount in words for cents

    Have you tried to export the modified report from test environment to live?

    or modified the SOP invoice report separately on live as well?

    Note: Before import the modified reports from test to live, make a back up of all the live reports.

    Hope this helps!!!

  • Community Member Profile Picture
    on at
    RE: How to show cheque amount in words for cents

    Hello Somakar,

    I tried the solution you offered in my internal test environment (GP 2013 R2) and it worked without an issue however when I am trying it in a LIVE environment (GP 2013 RTM - 12.00.1295 no service packs) I am coming across the following error. This is an urgent / priority issue that I have been trying to resolve for days.

    I want to show Amount in words for Dynamics GP Version 12.00.1295 in modified Sales invoice report (SOP Other)

    I have defined the calculated fields / formula per your instructions however the item details are not appearing on report.

    When we run the report, all other data is fine, the amount shows like it normally would but the words are not showing as expected based on the calculated value (in words) - just shows normally in numbers at the end.

    Please feel free to email me prem.mirpuri@yahoo.com or connect on Skype (prem.Mirpuri)  

  • Suggested answer
    soma Profile Picture
    24,410 on at
    RE: How to show cheque amount in words for cents

    RoomRyn,

    The code mentioned by above is tested by in Dexterity. For Report Writer, try the below code.

    1. amount = Pass your amount here ---(currency)
    2. dollars = RW_Truncate (amount, 0, 0) ---(currency)  
    3. cents = (amount - dollars) * 100.0 ---(currency)
    4. dollarstr = RW_ConvertToWordsAndNumbers (dollars, "Z-US$", 0) ---(string) note: Pass the currecy ID value to the second parameter.
    5. centposition = RW_Pos (dollarstr, "00", 1) ---(integer)
    6. calCentPos1 = centposition - 1  --(integer)
    7. calCentPos2 = centposition + 2  --(integer)
    8. amountinwrd1= RW_Left (dollarstr, calCentPos1 ) ---(string)
    9. amountinwrd2 = RW_Substring (dollarstr, calCentPos2 , 20) ---(string)
    10. centinwrd1 = RW_ConvertToWordsAndNumbers (cents ,"_", 0) ---(string) note: Pass the "_"  value to the second parameter.
    11. length = RW_Length (centinwrd1) ---(integer)
    12. calLen1 = length - 4 --(integer)
    13. centinwrd2  = RW_Left (centinwrd1, calLen1 ) ---(string)
    14. amountinwrd3 = RW_Trim (centinwrd2 , 3, " ") ---(string)
    15. resultinwords = amountinwrd1+ amountinwrd3+amountinwrd2 ---(string)

    Hope this helps!!!

  • Romryan Profile Picture
    on at
    RE: How to show cheque amount in words for cents

    Soma,

    Am getting an error "string operand not allowed" and I think this is coming from calculated field 12.

    When I remove calculated field 12 am still getting an error "user defined function failed in execution" which I don't know bearing in mind I have the other 11 calculated fields.

    RomRyn

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans