How to create a Line Number field for the lines items on the SOP Blank Quote Form, on the SOP Blank Order Form, on the SOP Blank Invoice Form, on the SOP Blank Return Form, and on the SOP Blank Back Order Form reports in Microsoft Dynamics GP


INTRODUCTION


This article describes how to create a "calculated field per line" item that prints whole numbers for line numbers regardless of whether the LNITMSEQ (Line Item Sequence) field in table SOP10200 will produce a whole number when divided by 16,384.

You can follow the steps in the "More Information" section for the following reports in Microsoft Dynamics GP:

• SOP Blank Quote Form
• SOP Blank Order Form
• SOP Blank Invoice Form
• SOP Blank Return Form
• SOP Blank Back Order Form



     

MORE INFORMATION

MORE INFORMATION


Create the calculated field

Note The following steps use the SOP Blank Invoice Form report as an example.
1. On the Tools menu, point to Customize , click Report Writer , and then click Reports .
2. In the Report Writer window, click SOP Blank Invoice Form in the Original Reports area, and then click Insert .
3. Click SOP Blank Invoice Form in the Modified Reports area, and then click Open .
4. In the Report Definition window, click Layout to open the layout of the SOP Blank Invoice Form report.
5. In the Toolbox window, click Calculated Fields in the resource list, and then click New .
6. In the Name field, type Line Number_Increment , click Integer in the Type field, and then click Calculated in the Expression Type area.
7. On the Functions tab, click User Defined , click Purchasing in the Core field, click rw_IncrementLineNumber in the Function field, and then click Add .
8. On the Constants tab, click Integer in the Type field, type 1 in the Constant field, and then click Add .
9. On the Fields tab, click Sales Transaction Amounts Work in the Resources field, click Line Item Sequence in the Field field, and then click Add .
10. Click the Constants tab, verify that the value in the Type field is Integer , verify that the value in the Constant field is 1 , and then click Add .
11.

Click OK . You expect the following calculated field to appear in the report:

• Calculated Field: Line Number_Increment
• Calculated: FUNCTION_SCRIPT( rw_IncrementLineNumber 1 SOP_LINE_WORK.Line Item Sequence 1 )
• Result Type: Integer



     
12. In the Toolbox window, click New .
13. Type Line Number_Re-set in the Name field, click Integer in the Type field, and then click Calculated in the Expression Type area.
14. On the Functions tab, click User Defined , click Purchasing in the Core field, click rw_ResetLineNumber in the Function field, and then click Add .
15. On the Constants tab, click String in the Type field, type 1 in the Constant field, and then click Add .
16.

Click OK . You expect the following calculated field to appear in the report:

• Calculated Field: Line Number_Re-set
• Calculated: FUNCTION_SCRIPT( rw_ResetLineNumber "1" )
• Result Type: Integer



     
17. Click Line Number_Increment under Calculated Fields , and then drag it to the H2 - Item area. This will print your line numbers.
18. Click Line Number_Re-set under Calculated Fields , and then drag it to the Report Footer area.
19. Double-click Line Number_Re-set in the Report Footer area.
20. In the Report Field Options window, click Invisible in the Visibility field, click Data in the Display Type area, and then click OK .
21. When you are prompted to save the changes to this report layout, click Microsoft Dynamics GP on the File menu, and then click Save .

Grant permissions to the modified report

Microsoft Dynamics GP 10.0

1. On the Microsoft Dynamics GP menu, point to Tools , point to Setup , point to System , and then click Alternate/Modified Forms and Reports .
2. In the ID box, type the user ID of the user who will print the modified report.
3. In the Product list, click Microsoft Dynamics GP .
4. In the Type list, click Reports .
5. Expand the Sales folder.
6. Expand folder for the report that you modified.
7. Click Microsoft Dynamics GP (Modified) .
8. Click Save .