Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article, you can learn how to modify the SOP Blank Invoice Form report in Sales Order Processing in Dynamics GP so that it prints more than 4 line item comments and includes customized address fields.
We recommend that you always start by backing up your reports before you begin a new modification.
Back up the report
If the existing Microsoft Dynamics GP reports have been modified, back up the Reports.dic file.
To locate the Reports.dic file, in Microsoft Dynamics GP, point to Tools on the Microsoft Dynamics GP menu, point to Setup, point to System, and then choose Posting Accounts.
If you are prompted to enter the system password, type your password, and then choose OK.
Note the path that appears in the Reports box.
Choose OK to close the Edit Launch File window.
Modify the address fields
This section describes how to modify the following fields on the SOP Blank Invoice Form report in Sales Order Processing in Microsoft Dynamics GP:
The Bill To Address Line field
The Ship To Address Line field
Additionally, this section describes how to add a comma character (,) between the City field and State field in the Ship To Address Line 3 field.
To modify the Bill To Address Line field and Ship To Address Line field on the SOP Blank Invoice Form report, follow these steps:
Create 2 new calculated fields. To do this, follow these steps:
Start Report Writer. To do this, choose Tools, point to Customize, and then choose Report Writer.
Choose Microsoft Dynamics GP in the Product list.
Choose Reports.
In the Original Reports list, choose SOP Blank Invoice Form, and then choose Insert.
In the Modified Reports list, choose SOP Blank Invoice Form, and then choose Open.
Choose Layout.
In the Toolbox window, choose Calculated Fields in the Resources list, and then choose New.
In the Name box, type a name for the calculated field. For example, type City, State, or ZIP in the Name box.
In the Result Type list, choose String, and then choose Calculated in the Expression Type box.
On the Functions tab, choose System-Defined, choose
STRIP
in the Function list, and then choose Add.On the Fields tab, choose Customer Master Address File in the Resources list, choose City in the Field list, and then choose Add.
Choose after the last ) in the Expressions Calculated field to close the function.
In the Operators area, choose
CAT
.On the Constants tab, choose
String
in the Type list, type a comma character and enter a space character in the Constant field, and then choose Add.In the Operators area, choose
CAT
.On the Functions tab, choose System-Defined, choose
STRIP
in the Function list, and then choose Add.On the Fields tab, choose Customer Master Address File in the Resources list, choose State in the Field list, and then choose Add.
Choose after the last ) in the Expressions Calculated field to close the function.
In the Operators area, choose
CAT
.On the Constants tab, choose
String
in the Type list, enter two space characters in the Constant field, and then choose Add.In the Operators area, choose
CAT
.On the Functions tab, choose System-Defined, choose
STRIP
in the Function list, and then choose Add.On the Fields tab, choose Customer Master Address File in the Resources list, choose Zip, and then choose Add.
The following function script appears.
STRIP (RM\_Customer\_MSTR\_ADDR.City) \# ", " \# STRIP (RM\_Customer\_MSTR\_ADDR.State) \# " " \# STRIP (RM\_Customer\_MSTR\_ADDR.Zip)**Note** Additionally, you can perform similar steps if you want to add a comma character between the City field and State field in the Ship To Address Line 3 field. To do this, follow steps 2a-2x. However, throughout these steps, choose Sales Transaction Work instead of Customer Master Address File in the Resources list.
Choose OK.
Replace the existing Bill To Address Line 3 field with the new calculated field. To do this, follow these steps:
In the Page Header area of the report layout, choose the Bill To Address Line 3 field, and then press DELETE.
In the Toolbox window, choose the new calculated field that you created in step 2. Then, drag that field to the same location on the report layout where the Bill To Address Line 3 field was.
Repeat these in the Report Header section of the report layout.
Replace the existing Ship To Address Line 3 field with the new calculated field. To do this, follow these steps:
In the Page Header area of the report layout, choose the Ship To Address Line 3 field, and then press DELETE.
In the Toolbox window, choose the new calculated field that you created in step 2, and then drag that field to the same location on the report layout where the Ship To Address Line 3 field was.
Repeat these in the Report Header section of the report layout.
Note
Steps 3 and 4 only work if all the customers have at least two lines of address information other than the following fields:
- The City field
- The State field
- The ZIP Code/Postal Code field If all the customers have only one line of address information other than the previously mentioned fields, you must delete the Bill To Address Line 2 and Bill To Address Line 3 fields from the report layout.
On the File menu, choose Microsoft Dynamics GP.
When you are prompted to save the changes to the report layout, choose Save.
When you are prompted to save the changes to the report, choose Save.
Assign security permissions to the modified report
On the Tools menu, point to Setup, point to System, and then choose Security.
Note
If you are prompted to enter the system password, type the system password.
In the User ID list, choose the identifier who will access the report.
In the Type list, choose Modified Reports.
In the Series list, choose Sales.
In the Access List box, double-click SOP Blank Invoice Form, and then choose OK.
Note
After you choose OK, an asterisk (*) appears next to the report name.
Create the calculated fields to display more than four comments
In this section, you learn how to modify the SOP Blank Invoice Form report to display more than four line item comments.
Start Report Writer. To do this, choose Tools, point to Customize, and then choose Report Writer.
Choose Microsoft Dynamics GP in the Product list.
Choose Reports.
In the Original Reports list, choose SOP Blank Invoice Form, and then choose Insert.
In the Modified Reports list, choose SOP Blank Invoice Form, and then choose Open.
In the Report Definition window, choose Layout.
In the Toolbox window, choose Calculated Fields in the Resources list, and then choose New.
In the Calculated Field Definition window, type LINE COMMENT1 in the Name box.
In the Result Type list, choose
String
.In the Expression Type box, choose Calculated.
Choose the Functions tab, and then choose User-Defined.
In the Core list, choose System.
In the Function list, choose
RW\_SOPLINECommentText
, and then choose Add.Choose the Fields tab, and then choose Sales Line Comment Work and History in the Resources list.
In the Field list, choose SOP Type, and then choose Add.
In the Field list, choose SOP Number, and then choose Add.
In the Field list, choose Line Item Sequence, and then choose Add.
In the Field list, choose Component Sequence, and then choose Add.
Choose the Constants tab, and then choose Integer in the Type list.
In the Constant field, type 80 , and then choose Add.
Note
The number that you type is the maximum character length of the calculated field that can be printed in Report Writer. You can use a smaller value if you do not require 80 characters.
In the Constant field, type 1 , and then choose Add.
Verify that the expression in the Calculated field appears as the following string:
FUNCTION\_SCRIPT(RW\_SOPLINECommentText SOP\_LINE\_CMT\_WORK\_HIST.SOP Type SOP\_LINE\_CMT\_WORK\_HIST.SOP Number SOP\_LINE\_CMT\_WORK\_HIST.Line Item Sequence SOP\_LINE\_CMT\_WORK\_HIST.Component Sequence 80 1) **Note** This expression refers to the first line item comment, LINE COMMENT1. To display the other comment lines, you can repeat step 6 through step 20 to create additional calculated fields. When you create these additional calculated fields, you must change the values that you typed in step 7 and in step 20. For example, when you create a calculated field for the second comment line, you must type "LINE COMMENT2" in step 7. You must type "2" in step 20. When you create a calculated field for the third line item comment, you must type "LINE COMMENT3" in step 7. You must type "3" in step 20. Therefore, the expression of the calculated field for the second line item comment must resemble the following string:FUNCTION\_SCRIPT(RW\_SOPLINECommentText SOP\_LINE\_CMT\_WORK\_HIST.SOP Type SOP\_LINE\_CMT\_WORK\_HIST.SOP Number SOP\_LINE\_CMT\_WORK\_HIST.Line Item Sequence SOP\_LINE\_CMT\_WORK\_HIST.Component Sequence 80 2)
Choose OK.
In the Report Footer section of the report, set the visibility of the existing comment fields (labeled Comment 1 to Comment 4) to invisible. To do this, follow these steps:
Double-choose each comment field to open the Report Field Options window.
Note
You also can choose Field options on the Tools menu for each field to open the Report Field Options window.
In the Visibility field of each comment field, choose Invisible.
Choose OK.
Drag the calculated fields that you created in the Toolbox dialog box to the Report Footer section over the existing comment fields.
If you created more than four calculated fields for line item comments, drag the additional comment fields in the Toolbox dialog box to the F2 - Comment 4 section. To expand this section to make room for the additional calculated fields, choose the F2 box, and then drag down the F2 box.
Double-choose each field that is added, and then make sure that the display type is Last Occurrence for each field.
Choose OK to save the changes.
Save the changes to the report and exit Report Writer
On the File menu, choose Microsoft Dynamics GP.
Choose Save when you are prompted to save the changes to the report layout.
Choose Save when you are prompted to save the changes to the modified report.
Exit Report Writer.
Grant access to the report
To do this, use the Security tool in Dynamics GP.
Choose Microsoft Dynamics GP, point to Tools, point to Setup, point to System, and then choose Alternate/Modified Forms and Reports.
In the ID box, type the Alternative/Modified Forms and Reports ID that is associated with the user ID that will print this modified report.
In the Product list, choose Microsoft Dynamics GP.
In the Type list, choose Reports.
Expand the Sales folder.
Expand the folder for the report that you modified.
Choose Microsoft Dynamics GP (Modified).
Choose Save.
On the Microsoft Dynamics GP menu, point to Tools, point to Setup, point to System, and then choose User Security.
In the User list, choose the user ID that you used to modify the report.
In the Company list, choose the company that you used to modify the report.
In the Alternate/Modified Forms and Reports ID list, choose the ID of the user who will print the modified report.
See also
Add the Address 3 Field to Sales Documents
Sales Order Processing Part 5: Inquiries and reports