How to display a string label instead of an integer representation of a radio group in Microsoft Dynamics GP


INTRODUCTION


This article describes how to display a string label instead of an integer representation of a radio group in Microsoft Dynamics GP.

More Information


A setting that you configure by using an option is not stored in a table in Microsoft Dynamics GP.

Note Options are also known as radio buttons.

The setting is stored as an integer that represents the selected option. This integer is known as a radio group. If you want to display the value of an option, you can use the integer value that is based on the position of the selected option in the tab sequence. The first position has a value of 0, the second position has a value of 1, and so on. If you want to convert a setting that you configure by using an option into a string representation, use the RW_Token user-defined function. However, because the RW_Token function expects an integer that starts with a value of 1, you must create a calculated field that adds a 1 to the integer value. To create this calculated field, follow these steps.

Step 1: Back up the Reports.dic file


Back up the Reports.dic file if you have any modified Microsoft Dynamics GP reports. To do this, follow these steps:
  1. On the Tools menu, point to Setup, point to System, and then click Edit Launch File.
  2. If you are prompted for the password, type the system password.
  3. In the Edit Launch File window, click the product for the report that you want to modify. Note the path that appears in the Reports box.
  4. Click OK to close the Edit Launch File window.

Step 2: Open Report Writer

  1. On the Tools menu, point to Customize, and then click Report Writer.
  2. Use the appropriate step:
    • In Microsoft Dynamics GP 9.0, click Microsoft Dynamics GP in the Product list, and then click OK.
    • In Microsoft Business Solutions - Great Plains 8.0 and 7.5, click Great Plains in the Product list, and then click OK.

Step 3: Modify the report

  1. Open the report layout of the report that you are modifying.
  2. In the Toolbox window, click Calculated Fields in the Resources list, and then click New.
  3. Type a name for the calculated field in the Name box.
  4. In the Resources list, click the table for the radio group field that you want to modify. In the Field list, click the radio group field that you want to convert, and then click Add.
  5. Click the plus sign.
  6. Click the Constants tab, and then click Integer in the Type list. In the Constant field, type 1, and then click Add.
  7. Click OK.
  8. Click New, and then type a name for the string field.
  9. In the Result Type list, click String. In the Expression Type list, click Calculated.
  10. Click the Functions tab, and then click User-Defined.
  11. In the Core list, click System. In the Function list, click RW_Token, and then click Add.
  12. Click the Constants tab. In the Type list, click String.
  13. In the Constant field, enter the list of strings, and then click Add. Separate the strings by using a token character.
  14. In the Constant field, enter the same token character, and then click Add.
  15. Click the Fields tab, and then select the calculated field that you created.
  16. Click Add.
  17. Click OK.
  18. Drag the new calculated field into the report.
Note The following are some sample calculated fields:
  • FUNCTION_SCRIPT( RW_Token “One|Two|Three|Four|Five|Six” ”|” Radio_Group )
  • FUNCTION_SCRIPT( RW_Token “Balance Sheet,Profit and Loss” ”,” Posting_Type )
  • FUNCTION_SCRIPT( RW_Token “Debit:Credit” ”:” Typical_Balance )
For more information, see the Report Writer Programmer's Interface document in the Software Development Kit (SDK). You can install the SDK from the Tools folder of CD2 of the Microsoft Dynamics GP installation CDs.

Step 4: Grant security to the modified report

To grant security to the report, use one of the following methods.

Method 1: Use the Advanced Security tool

  1. On the Tools menu, point to Setup, point to System, and then click Advanced Security. If you are prompted for the password, type the system password.
  2. Click View, and then click by Alternate, Modified and Custom.
  3. Expand Microsoft Dynamics GP or Microsoft Great Plains, expand Reports, expand the node for the appropriate series, and then expand the node for the report that you modified.
  4. Click Microsoft Dynamics GP (Modified) or Microsoft Great Plains (Modified), click Apply, and then click OK.
Note By default, the current user and the current company are selected when you start the Advanced Security tool. Any changes that you make are for the current user and for the current company. However, you can select additional users in the User area of the Advanced Security window. You can select additional companies in the Company area of the Advanced Security window.

Method 2: Use Microsoft Dynamics GP security

  1. On the Tools menu, point to Setup, point to System, and then click Security. If you are prompted for the password, type the system password.
  2. In the User ID list, click the user ID of the user who will access the report.
  3. In the Product list, click the product for the report that you modified.
  4. In the Type list, click Modified Reports.
  5. In the Series list, click the series for the report that you modified.
  6. In the Access List box, double-click the report that you modified, and then click OK. An asterisk appears next to the report name.