Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Amount in Words on A/P Check

(0) ShareShare
ReportReport
Posted on by 3,482

Hi:

I'm modifying Report ID 10412 (Report Selection - Bank), which is the A/P check.

Below is a screenshot of the Amount in Words, and below that screenshot are the two formula expressions used for this.  (My guess is that the second formula is some sort of "overflow" field.)

I need for the asterisks in the beginning to appear at the end, instead.  And, the phrase "US DOLLARS" need not appear.

How do I meet these two requirements?

Thank you!

John

pastedimage1657212850346v1.png

=Cstr(Choose(97,Split(Cstr(ReportItems!FooterInfo.Value), Chr(177))))

=Cstr(Choose(98,Split(Cstr(ReportItems!FooterInfo.Value), Chr(177))))

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,159 on at
    RE: Amount in Words on A/P Check

    Try it as the Choose(98,Split(Cstr(ReportItems!FooterInfo.Value) inside the previously discussed right and len functions.

  • john.ellis Profile Picture
    john.ellis 3,482 on at
    RE: Amount in Words on A/P Check

    Hi Josh:

    I'm afraid that I got an error, upon trying this.  Below are the two "codings" that I made -- one for each field for check amount in words.

    Any thoughts?

    John

    =right(Cstr(Choose(97,Split(Cstr(ReportItems!FooterInfo.Value), Chr(177))))).GetData(1,2),len(Cstr(Choose(97,Split(Cstr(ReportItems!FooterInfo.Value), Chr(177))))).GetData(1,2))-4)

    =right(Cstr(Choose(98,Split(Cstr(ReportItems!FooterInfo.Value), Chr(177))))).GetData(1,2),len(Cstr(Choose(98,Split(Cstr(ReportItems!FooterInfo.Value), Chr(177))))).GetData(1,2))-4)

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,159 on at
    RE: Amount in Words on A/P Check

    Not quite a copy/paste. Add the suggested functions to the existing content. You can copy the existing content to paste it into the suggested functions as you need the string twice. Give it a try

  • john.ellis Profile Picture
    john.ellis 3,482 on at
    RE: Amount in Words on A/P Check

    Thanks, Josh!  Do I simply paste the code from the original posting into the text box?

    And, since there are two fields for amount in words from what I see, do I paste into both text boxes?

    John

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,159 on at
    RE: Amount in Words on A/P Check

    At the bottom of your original post you have what looks to be content from a text box on a RDLC layout. That is where the code should go.

  • john.ellis Profile Picture
    john.ellis 3,482 on at
    RE: Amount in Words on A/P Check

    Also need the asterisks moved.  

    I'm leery about messing with currency stuff just to make a modification.

    Thanks, though!

  • john.ellis Profile Picture
    john.ellis 3,482 on at
    RE: Amount in Words on A/P Check

    But, where do I "put that coding"?  That's what I need help with.  When it comes to programming BC, I don't even know where to begin.

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,159 on at
    RE: Amount in Words on A/P Check

    GB version looks a bit different to yours but effectively the Right() and Len() functions will do what you need. Adapt this to fit yours: right(Code.GetData(1,2),len(Code.GetData(1,2))-4)

    Gives you this type of output:

    pastedimage1657224354538v1.png

  • Suggested answer
    Dallefeld Profile Picture
    Dallefeld 11,425 User Group Leader on at
    RE: Amount in Words on A/P Check

    Do you have a currency code for USD setup and is the description US Dollars? What happens if you simply remove the description?

  • john.ellis Profile Picture
    john.ellis 3,482 on at
    RE: Amount in Words on A/P Check

    Thanks, Josh!

    Do I place that code inside of a text field on the report?  I'm not very swift on programming.  :)

    John

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans