Announcing Report Writer Function RW_ConvertToWordsAndNumbersParse
With the release of Microsoft Dynamics GP 2010 (formerly known as GP "11"), the issue with the RW_ConvertToWordsAndNumbers() report writer function caused by the 80 character limitation on string calculated fields has been resolved with the addition of a RW_ConvertToWordsAndNumbersParse() report writer function which has the RW_ParseString functionality built in.
For more information on the original issue and a work around using Visual Basic for Applications (VBA) see the following blog post:
Below is the SDK entry for the new function:
RW_ConvertToWordsAndNumbersParse
Module:
System Manager
Series:
System
Script type:
Global function
Form (If a form global):
Category:
Numeric Manipulation
Description:
Convert currency value to Words and Numbers, using descriptive terms from the Currency ID supplied. Returns the result parsed into lines of a specified length. Uses the Dexterity Field_ParseText() function.
Prerequisites:
none
Parameters:
in currency IN_Value. { Value of Currency }
in string IN_Currency. { Currency ID of Currency - Leave Blank for Functional }
in integer IN_Mode. { non-zero = Use Numbers and Words instead of only Words }
in integer IN_characters. { Number of Characters per Line }
in integer IN_line. { Line Number to Return }
Return Value:
function returns string OUT_string.
So an example of using the function return the amount in words and numbers to 3 lines of 80 characters into 3 string calculated fields is:
Name: | (c) ConvertToWordsAndNumbers1 |
Result Type: | String |
Expression Type: | Calculated |
Calculated: | FUNCTION_SCRIPT(RW_ConvertToWordsAndNumbersParse cyPrintTotal (c) Currency ID 0 80 1) |
Name: | (c) ConvertToWordsAndNumbers2 |
Result Type: | String |
Expression Type: | Calculated |
Calculated: | FUNCTION_SCRIPT(RW_ConvertToWordsAndNumbersParse cyPrintTotal (c) Currency ID 0 80 2) |
Name: | (c) ConvertToWordsAndNumbers3 |
Result Type: | String |
Expression Type: | Calculated |
Calculated: | FUNCTION_SCRIPT(RW_ConvertToWordsAndNumbersParse cyPrintTotal (c) Currency ID 0 80 3) |
Note: This new function is not included in the Microsoft Dynamics GP 2010 Beta code, you will need to install the final released code to be able to use it.
The following articles are related:
RW - Getting RW_ConvertToWordsAndNumbers() to work with multi-currency
RW - Getting RW_ConvertToWordsAndNumbers() to show cents in words
Enjoy using the new function and not having to worry about characters above the 80 mark being truncated.
David
17-Nov-2010: Attached RM Blank Document Package using RW_ConvertToWordsAndNumbersParse function.