How to add trailing asterisks after check amount in words

This one came up in the Microsoft Dynamics GP newsgroup today and I thought it would make for a good blog article.

Business Situation

It is common business practice to suffix the check amount in words with asterisks to prevent words being extended to reflect larger check amounts than what the check was originally written for.





















Challenges

The trailing asterisks need to be dynamic, not static, to accomodate for variable lengths in the amount in words. Asterisks should be able to change relative to the length of the amount in words.

Solution

Microsoft Dynamics GP check stubs reports generated in the Purchasing series use String A 255 and String B 255 directly from the PM_Payment_Work table. In order to add the asterisks at the end of the strings, two conditional calculated fields will need to be created. To add the asterisks we can use the Report Writer user-defined function RW_PadWithStars found in the financial series.

Steps

1) Open Report Writer.

v9. Go to Tools > Customize > Report Writer.
v10. Go to Microsoft Dynamics GP > Tools > Customize > Report Writer

Select Microsoft Dynamics GP and click on OK to continue.

2) Select the desired check stub form from the available reports. For our example we will use Check With Stub on Top and Bottom - Text. Click on Insert to continue.

3) Highlight the inserted stub and click the Open button.

4) Click on the Layout button to continue.

Adding the Calculated Fields

We will create two conditional calculated fields: (C) String A 255 and (C) String B 255. These fields will add the asterisks at the end of the amount in words based on whether PM_Payment_WORK.String B 255 is empty or not.

(C) String A 255


(C) String A 255
Returns: String
Condition: PM_Payment_Work.String B 255 <> ""
True Case: PM_Payment_Work.String A 255
False Case: FUNCTION_SCRIPT(RW_PadWithStars PM_Payment_Work.String A 255 255)

















Click OK to save the changes when finished

(C) String B 255


(C) String B 255
Returns: String
Condition: PM_Payment_Work.String B 255 <> ""
True Case: FUNCTION_SCRIPT(RW_PadWithStars PM_Payment_Work.String B 255 255)
False Case: PM_Payment_Work.String B 255

















Click OK to save the changes when finished.

Changing the Report Layout

1) Select String A 255 and press Delete on your keyboard to remove from the report layout.

2) Drag (C) String A 255 from the Calculated Fields list in the Toolbox window onto the report layout. Set in place of String A 255.

1) Select String B 255 and press Delete on your keyboard to remove from the report layout.

2) Drag (C) String B 255 from the Calculated Fields list in the Toolbox window onto the report layout. Set in place of String B 255.

Returning to GP and Setting Up Security

1) Exit the Report Layout window saving all changes.

2) Select Microsoft Dynamics GP from the File menu.

3) Grant security to the modified report

In Dynamics GP 9, open Advanced Security and located the Check With Stub on Top and Bottom - Text report in the Purchasing series. Click on the radio button for the modifed version.

In Dynamics GP 10, go to Microsoft Dynamics GP > Tools > Setup > System > Alternate/Modified Forms and Reports. Select the DEFAULTUSER role ID, select Microsoft Dynamics GP from the Products drop-down, then select Reports from the Type drop-down.

Click on the Purchasing folder and locate the Check With Stub on Top and Bottom - Text object. Click on the modified version.





















4) Click Save to continue.

Testing it out!

In your test environment, create a new check batch and print the checks selecting the format you modified. Print to screen or printer and verify the outcome.

















Related Articles

Developing for Dynamics GP - Cheque Amount in Words
Developing for Dynamics GP - Using the built-in Report Writer Functions

Downloads

Click here to download package file for this customization. Use the Customization Maintenance window to import the package file provided.

Warning: Importing this package file may destroy any previous modifications done to the Check With Stub on Top and Bottom - Text report.

Until next post!

MG.-
Mariano Gomez, MVP, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Comments

Greg Horner said…
Hello,
The trailing asterisks method works. The astericks stop at the same spot on the check, which it should. However, I'm trying to extend the asterisks (make more) further down the line, but I can't seem to figure it out. Stretching the field does nothing.

I thought the "255" may have had something to do with it, but it would not work, if I changed the number of 255.

Thank you so much for this blog post. It is very helpful nonethless. My email is ghorner@amllp.com if you don't mind.
Theresa G. said…
Can this method also be used to add asterisks before and after the numerical amount? Or are modifications required?

Popular posts from this blog

Power Apps - Application Monitoring with Azure Application Insights

DBMS: 12 Microsoft Dynamics GP: 0 error when updating to Microsoft Dynamics GP 2013 R2

eConnect Integration Service for Microsoft Dynamics GP 2010