How to modify the SOP Blank Invoice Form to display the total amount of the invoice in words in Microsoft Dynamics GP and in Microsoft Great Plains
This article describes how to use Report Writer in Microsoft Dynamics GP and in Microsoft Business Solutions - Great Plains to modify the SOP Blank Invoice Form to display the total amount of the invoice in words.
Applies to: Microsoft Dynamics GP
Original KB number: 917473
Introduction
To modify the SOP Blank Invoice Form to display the total amount of the invoice in words, follow these steps:
More information
Back up and then open the report. To do it, follow these steps:
If you have existing modified Microsoft Dynamics GP or Microsoft Great Plains reports, back up the Reports.dic file. To find the Reports.dic file, follow these steps:
1.On the Tools menu, point to Setup, point to System, and then select Edit Launch File. If you're prompted, type the system password. 2.In the Edit Launch File dialog box, select Microsoft Dynamics GP or Great Plains. The location of the Reports.dic file is displayed in the Reports field.
Select Tools, point to Customize, and then select Report Writer.
In the Product list, select Microsoft Dynamics GP or Great Plains, and then select OK.
In Report Writer, select Reports.
In the Original Reports column, select SOP Blank Invoice Form, and then select Insert.
In the Modified Reports list, select SOP Blank Invoice Form, and then select Open.
Add a report field that you can use to obtain the correct Currency ID value when you print in originating currency. To do it, follow these steps:
- In the Report Definition dialog box, select Layout.
- In the Toolbox dialog box, select Sales Transaction Work in the Table list. Then, select Currency ID.
- Drag the field onto the RF section of the report.
- Double-click the field.
- Select Invisible in the Visibility list, select Last Occurrence in the Display Type box, and then select OK to close the dialog box.
Create a calculated field to obtain the appropriate Currency ID based on the currency view being used. To do it, follow these steps:
- In the Toolbox dialog box, select Calculated Fields in the Table list. Then, select New.
- In the Name box, type CurrencyID.
- In the Result Type list, select String, and then select the Conditional option in the Expression Type area.
- Select the Fields tab, select Calculated Fields in the Resources list. Then, select (C) Force Functional in the Field list.
- Select Add.
- Select Equals (=) in the Operators section.
- Select the Constants tab.
- In the Type list, select Integer.
- In the Constant value box, type 1. Then, select Add.
- Select the True Case field.
- Select the Fields tab.
- In the Resources list, select Globals. Then, select Functional Currency in the Field list.
- Select Add.
- Select the False Case field.
- Select the Fields tab.
- In the Resources list, select Report Fields. Then, select RF_LAST Currency ID in the Field list.
- Select Add.
- Select OK to close the Calculated Field Definition dialog box.
Create a calculated field by using the RW_ConvertToWordsAndNumbers function, and then add the field to the report. To do it, follow these steps:
In the Toolbox dialog box, select Calculated Fields in the Table list, and then select New.
In the Name box, type AmountinWords.
In the Result Type list, select String. Then, select the Calculated option in the Expression Type area.
Select the Functions tab, and then select User-Defined.
In the Core list, select System. Then, select RW_ConvertToWordsAndNumbers in the Function list.
Select Add.
Select the Fields tab.
In the Resources list, select Calculated Fields. Then, select F/O Document Amount in the Field list.
Select Add.
Select the Fields tab.
In the Resources list, select Calculated Fields. Then, select CurrencyID in the Field list.
Select Add.
In the Type list, select Integer, and then select Add. The calculated expression should resemble the following expression:
FUNCTION_SCRIPT(RW_ConvertToWordsAndNumbers F/O Document Amount CurrencyID 0 )
Note
There's a limit of 80 characters for calculated fields that contain strings. So if it takes more than 80 characters to display the amount in words, the amount in words will be truncated to the first 80 characters.
Select OK to close the Calculated Field Definition dialog box.
In the Toolbox dialog box, select Calculated Fields in the Table list. Then, select AmountinWords.
Drag the field onto the RF section of the report.
Double-click the field, and then select Data in the Display Type box.
Select OK to close the dialog box.
Close the report layout.
When you're prompted to save your changes, select Save.
Exit Report Writer. To do it, follow these steps:
- In the Report Definition dialog box, select OK.
- On the File menu, select Microsoft Dynamics GP or Microsoft Business Solutions - Great Plains.
Grant access to the report. To do it, use one of the following methods.
Method 1
Use the Advanced Security tool. To do it, follow these steps:
- On the Tools menu, point to Setup, point to System, and then select Advanced Security. If you're prompted, type the system password.
- Select View, and then select by Alternate, Modified and Custom.
- Expand the following nodes:
- Microsoft Dynamics GP or Great Plains
- Reports
- Sales
- SOP Blank Invoice Form
- Select Microsoft Dynamics GP (Modified) or Great Plains (Modified).
- Select Apply, and then select OK.
Note
By default, when you start the Advanced Security tool, the current user and company are selected. Any changes that you make are for the current user and company. However, you can select additional users and companies in the User and Company areas of the Advanced Security dialog box.
Method 2
Use standard Microsoft Dynamics GP or Microsoft Great Plains security. To do it, follow these steps:- On the Tools menu, point to Setup, point to System, and then select Security. If you're prompted, type the system password.
- In the User ID list, select the user ID of the user to whom you want to give access to the report.
- In the Type list, select Modified Reports.
- In the Series list, select Sales.
- In the Access List box, double-click SOP Blank Invoice Form, and then select OK. An asterisk appears next to the report name.
Disclaimer
Microsoft and/or its suppliers make no representations or warranties about the suitability, reliability or accuracy of the information contained in the documents and related graphics published on this website (the "materials") for any purpose. The materials may include technical inaccuracies or typographical errors and may be revised at any time without notice.
To the maximum extent permitted by applicable law, Microsoft and/or its suppliers disclaim and exclude all representations, warranties, and conditions whether express, implied or statutory, including but not limited to representations, warranties, or conditions of title, non infringement, satisfactory condition or quality, merchantability and fitness for a particular purpose, with respect to the materials.