Microsoft Dynamics GP 2013 R2 updates to Report Writer Functions

David Meego - Click for blog homepageYou might remember the story about how I created a suite of Report Writer functions and got them added to the version 7.0 Dynamics.dic core dictionary. The aim for these functions was to make it easier for partner consultants and customers to modify the reports without needing custom scripting in Visual Basic for Applications (VBA) or Dexterity. They are documented in the Report Writer Functions document in the Software Developers Kit (SDK).

Based on feedback I have received from the community, I have made some changes to a few of the Report writer functions and submitted them to the development team for inclusion in the Microsoft Dynamics GP 2013 R2 (Service Pack 3) code.

Below is a summary of the Report Writer (RW) functions changed and what new functionality is available. 

 

RW_CoAddrIDInfo()

 

RW_PMAddrIDInfo()

  • If an empty string is passed as the Address ID (second) parameter, the address data is pulled from the Vendor Master (PM_Vendor_MSTR, PM00200) table instead of Vendor Address Master (PM_Address_MSTR, PM00300) table.

 

RW_RMAddrIDInfo()

  • If an empty string is passed as the Address ID (second) parameter, the address data is pulled from the Customer Master (RM_Customer_MSTR, RM00101) table instead of Customer Address Master (RM_Customer_MSTR_ADDR, RM00102) table.
     
  • For the Field (third) parameter, The values 14 and 15 have been added for the User Defined 1 and User Defined 2 fields respectively.

 

RW_GetInternetText()

  • Updated Field (sixth) parameter, so that it works without errors. The values of 10 (to), 11(cc) and 12(bcc) return email addresses, any other value returns the internet text field.

  

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

 

For more information, check out the following blog articles:

 

Hope you like the improvements.

David

22-Aug-2014: Added note about RW_CoAddrIDInfo function being broken.