Microsoft Dynamics GP 2013 R2 updates to Report Writer Functions

David Meego - Click for blog homepageThis is a reposting of an article I originally wrote on my Developing for Dynamics GP blog.

You 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.

This article was originally posted on the Developing for Dynamics GP Blog and has been reposted on http://www.winthropdc.com/blog.

2 thoughts on “Microsoft Dynamics GP 2013 R2 updates to Report Writer Functions

Please post feedback or comments

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.