Customize Your Dynamics GP SOP Blank Invoice Form: A Practical Guide

Table of Contents

Dynamics GP SOP Blank Invoice Form

This guide provides detailed instructions on how to modify the SOP Blank Invoice Form within Microsoft Dynamics GP or Microsoft Business Solutions - Great Plains using Report Writer. The specific modification covered here is adding the total amount of the invoice displayed in words, a common requirement for formal invoices. By following these steps, you can enhance the clarity and professionalism of your customer invoices.

Introduction

The standard SOP Blank Invoice Form in Dynamics GP is a versatile template, but businesses often need to customize it to meet specific requirements. One frequent customization is the inclusion of the invoice total written out in words, which adds a layer of formality and helps prevent errors in reading the numerical value. This modification is achieved using the built-in Report Writer tool, which allows users to manipulate report layouts and add calculated fields. The process involves accessing the report definition, adding necessary data fields, creating calculated fields to perform the conversion, and finally placing the new information on the report layout.

Detailed Modification Steps

To successfully modify the SOP Blank Invoice Form to display the total amount of the invoice in words, carefully follow each of the steps outlined below. It is crucial to perform these actions within the Report Writer environment.

Step 1: Back Up and Open the Report

Before making any modifications, it is highly recommended to back up your existing Reports.dic file. This file contains all your customized reports. Creating a backup ensures that you can restore your original reports if any issues arise during the modification process. Once the backup is secured, you can safely open the desired report in Report Writer.

  1. Locate the Reports.dic file:

    • Navigate to the Tools menu within Dynamics GP.
    • Point to Setup, then System, and finally select Edit Launch File.
    • If prompted, provide the system password.
    • In the Edit Launch File dialog box, select either Microsoft Dynamics GP or Great Plains depending on your version. The exact path to your Reports.dic file will be displayed in the Reports field. Note this location and create a copy of the file before proceeding.
  2. Access Report Writer:

    • From the Tools menu, point to Customize.
    • Select Report Writer from the customization options.
  3. Select the Product:

    • In the Product list within Report Writer, select Microsoft Dynamics GP or Great Plains.
    • Click OK to proceed.
  4. Open the Report:

    • Within Report Writer, select Reports.
    • In the Original Reports column, locate and select SOP Blank Invoice Form.
    • Click Insert to move the report to the Modified Reports column. This action creates a copy of the original report that you can modify without affecting the base version.
    • In the Modified Reports list, select SOP Blank Invoice Form.
    • Click Open to open the Report Definition dialog box for the modified report.

Step 2: Add Currency ID Field to the Report Layout

To ensure that the “amount in words” function correctly handles multiple currencies, you need to make the Currency ID available on the report layout, even if it’s not visible to the end-user. This field will provide the necessary currency context for the conversion function.

  1. From the Report Definition dialog box, select Layout. This opens the Report Layout window.
  2. In the Toolbox dialog box (which should appear automatically; if not, go to Tools > Toolbox), select Sales Transaction Work from the Table list.
  3. From the fields available for the Sales Transaction Work table, select Currency ID.
  4. Click and drag the Currency ID field onto the RF (Report Footer) section of the report layout. The specific placement within the RF section doesn’t critically matter since it will be invisible, but placing it logically can help organization.
  5. Double-click the field you just added to open its properties window.
  6. In the Visibility list, select Invisible. This ensures the Currency ID is available for calculations but not printed on the final invoice.
  7. In the Display Type box, select Last Occurrence. This is often suitable for fields placed in report footers or sections where you only need the final value.
  8. Click OK to close the dialog box and apply the changes.

Step 3: Create a Calculated Field for Conditional Currency ID

When dealing with multi-currency in Dynamics GP, reports can sometimes display amounts in either the functional currency or the originating currency. The RW_ConvertToWordsAndNumbers function needs the correct Currency ID based on which currency is being used for the report. This calculated field will determine the appropriate Currency ID dynamically.

  1. In the Toolbox dialog box, select Calculated Fields in the Table list.
  2. Click New to open the Calculated Field Definition dialog box.
  3. In the Name box, type a descriptive name for the field, such as CurrencyID.
  4. In the Result Type list, select String. Currency IDs are typically stored as strings.
  5. In the Expression Type area, select the Conditional option. This indicates that the value of this field will depend on a condition.
  6. Now, build the conditional expression:

    • Go to the Fields tab.
    • In the Resources list, select Calculated Fields.
    • In the Field list, select (C) Force Functional. This calculated field (provided by GP) evaluates to 1 if the report is being forced to print in functional currency, and 0 otherwise.
    • Select Add to add this field to the expression.
    • Go to the Operators section and select Equals (=).
    • Go to the Constants tab.
    • In the Type list, select Integer.
    • In the Constant value box, type 1.
    • Select Add. The condition part of the expression should now read something like '(C) Force Functional = 1'.
  7. Define the True Case (when the condition is true, i.e., printing in functional currency):

    • Select the True Case field.
    • Go back to the Fields tab.
    • In the Resources list, select Globals.
    • In the Field list, select Functional Currency. This global field holds the Currency ID of your company’s functional currency.
    • Select Add.
  8. Define the False Case (when the condition is false, i.e., printing in originating currency):

    • Select the False Case field.
    • Go back to the Fields tab.
    • In the Resources list, select Report Fields.
    • In the Field list, select RF_LAST Currency ID. This is the invisible field you added in Step 2, which contains the Currency ID of the originating currency for the transaction.
    • Select Add.
  9. Review the expression. It should look something like: IF ((C) Force Functional = 1) THEN Functional Currency ELSE RF_LAST Currency ID.

  10. Click OK to save and close the Calculated Field Definition dialog box.

Step 4: Create Calculated Field for Amount in Words and Add to Report

This is the core step where you use the Dynamics GP function to convert the invoice amount into words. You will create another calculated field that calls the RW_ConvertToWordsAndNumbers function, passing the document amount and the dynamically determined currency ID as parameters.

  1. In the Toolbox dialog box, with Calculated Fields still selected in the Table list, select New.
  2. In the Name box, type a name for this field, such as AmountinWords.
  3. In the Result Type list, select String, as the output of the function is text.
  4. In the Expression Type area, select the Calculated option.
  5. Now, build the calculated expression using the function:

    • Go to the Functions tab, and then select User-Defined.
    • In the Core list, select System.
    • In the Function list, select RW_ConvertToWordsAndNumbers.
    • Select Add. This adds the function script to the expression.
  6. Add the function parameters:

    • Go to the Fields tab.
    • In the Resources list, select Calculated Fields.
    • In the Field list, select F/O Document Amount. This field represents the document amount in the appropriate currency (either functional or originating, depending on the report view).
    • Select Add.

    • Go back to the Fields tab.

    • In the Resources list, select Calculated Fields.
    • In the Field list, select CurrencyID. This is the calculated field you created in Step 3.
    • Select Add.

    • Go to the Constants tab.

    • In the Type list, select Integer.
    • In the Constant value box, type 0. This parameter represents the number of decimal places to consider in the words conversion. For currencies like USD, EUR, etc., you typically want to convert the whole number part and handle cents separately (which the function does automatically with 0 decimal places).
    • Select Add.
  7. Review the complete calculated expression. It should resemble the following structure:

    FUNCTION_SCRIPT(RW_ConvertToWordsAndNumbers F/O Document Amount CurrencyID 0 )
    

    This expression calls the specified function with the document amount, the calculated currency ID, and 0 decimal places as inputs.

    Note: Be aware that there is a technical limit of 80 characters for calculated fields containing strings in Report Writer. If the amount in words is very long (e.g., for a very large number), the output will be truncated to the first 80 characters. This is a limitation of the Report Writer function itself.

  8. Click OK to save and close the Calculated Field Definition dialog box.

  9. Add the AmountinWords field to the report layout:

    • In the Toolbox dialog box, select Calculated Fields in the Table list.
    • Select the AmountinWords field you just created.
    • Drag this field onto the desired section of the report layout where you want the amount in words to appear. Typically, this is placed in the RF (Report Footer) section near the total amount field.
    • Double-click the newly added field on the layout.
    • In the Display Type box, ensure Data is selected. This tells Report Writer to print the content of the field.
    • Adjust the field’s size and position on the layout as needed to accommodate the expected length of the text. You may need to make it wide enough to display the text for typical invoice amounts.
    • Click OK to close the dialog box.
  10. Close the report layout window.

  11. When prompted to save your changes to the report layout, select Save.

Step 5: Exit Report Writer

Once you have finished modifying the report layout and saving your changes, you need to exit Report Writer to return to Dynamics GP.

  1. In the Report Definition dialog box (which should still be open after closing the layout), select OK.
  2. On the File menu in Report Writer, select Microsoft Dynamics GP or Microsoft Business Solutions - Great Plains to exit.

Step 6: Grant Security Access to the Modified Report

After modifying a report, users will not see the changes automatically. You must grant specific users or roles security access to the modified version of the report. Dynamics GP provides two primary methods for managing security: Advanced Security and standard Security.

Method 1: Using Advanced Security

Advanced Security offers a more granular approach to managing access, allowing you to select modified reports by user, company, or even series.

  1. On the Tools menu, point to Setup, then System, and select Advanced Security.
  2. If prompted, type the system password.
  3. In the Advanced Security dialog box, select View, and then select by Alternate, Modified and Custom. This view helps you easily distinguish between original and modified reports.
  4. Expand the following nodes in the navigation tree:
    • Microsoft Dynamics GP or Great Plains (depending on your installation)
    • Reports
    • Sales
    • SOP Blank Invoice Form
  5. Under the SOP Blank Invoice Form node, you will see options like Microsoft Dynamics GP (Original), Microsoft Dynamics GP (Modified), or Great Plains (Original), Great Plains (Modified). Select Microsoft Dynamics GP (Modified) or Great Plains (Modified).
  6. In the right-hand pane, select the users or roles to whom you want to grant access. By default, the current user and company are selected. You can change these in the User and Company areas at the top of the dialog box if you need to grant access for other users or companies.
  7. Click Apply to save the security changes.
  8. Click OK to close the Advanced Security dialog box.

Method 2: Using Standard Security

The standard Security window is simpler and suitable if you manage security primarily by user ID and type.

  1. On the Tools menu, point to Setup, then System, and select Security.
  2. If prompted, type the system password.
  3. In the Security window, select the specific User ID from the list for whom you are granting access.
  4. In the Type list, select Modified Reports.
  5. In the Series list, select Sales.
  6. In the Access List box on the left, locate SOP Blank Invoice Form. Double-click it or select it and click Add to move it to the right-hand list (the list of reports the user has access to). An asterisk (*) will appear next to the report name in the Access List once it’s added.
  7. Click OK to save the security changes and close the window.
  8. Repeat this process for any other user IDs who need access to the modified invoice form.

After granting access using either method, the selected users should now see and be able to print invoices using the modified SOP Blank Invoice Form that includes the amount in words.

Important Considerations and Limitations

While the RW_ConvertToWordsAndNumbers function is very useful, it’s important to be aware of its behavior and potential limitations:

  • Language: The function’s output language is typically tied to the language configuration of the Dynamics GP installation or potentially the user’s language settings. Ensure it generates words in the desired language for your invoices.
  • Currency Specifics: The function is designed to handle the word conversion based on standard currency formatting rules. However, specific regional nuances in how amounts are written might not be fully supported for all currencies.
  • Truncation: As mentioned earlier, the 80-character limit for string calculated fields can result in the amount in words being cut off for very large amounts. If you frequently deal with extremely high invoice totals that produce very long text strings, you might need to explore alternative methods outside of standard Report Writer string fields, though this is a more advanced customization.
  • Performance: Adding complex calculated fields can sometimes introduce a slight delay in report generation, although for this specific function, the impact is usually negligible.

Understanding these points helps manage expectations regarding the output of the modified report.

Conclusion

Modifying the SOP Blank Invoice Form to include the total amount in words is a valuable customization that enhances the professionalism and clarity of your invoices in Microsoft Dynamics GP. By leveraging the power of Report Writer and its built-in functions, you can achieve this specific requirement efficiently. Remember to always back up your reports dictionary before making changes and to grant security access to the modified report so that users can benefit from your work.

This guide provides a step-by-step approach to implementing this modification. Have you customized your Dynamics GP reports in other ways? Do you have any tips or challenges you’ve encountered when using Report Writer? Share your experiences and thoughts in the comments below!

Post a Comment