Window Fields with Multiple Keys

<< Click to Display Table of Contents >>

Extender 2013

Window Fields with Multiple Keys

The process for adding fields from an Extender window with multiple keys is slightly different from a window with a single key.

 

To add an Extender Window (with multiple keys) field to a Dynamics GP report:

1.Select Tools >> Customize >> Report Writer.
2.Select Dynamics GP as the Product and click OK.
3.Click Reports to open the Report Writer window.
4.Select the report that you want to modify from the Original Reports list.
5.Click Insert to move the report from the Original Reports list to the Modified Reports list.
6.Select the Report in the Modified Reports list.
7.Click Open to open the Report Definition window.
8.Click the Layout window to open the Report Layout window.
9.If the Toolbox window is not already open, select Layout >> Toolbox to open it.
10.Select Calculated Fields from the Resources list and click New to open the Calculated Field Definition window.
11.Enter a Name for the calculated field that will become your key.
12.Select the Result Type as String.

 

light45

You need to ensure that you have the key fields in the same order they appear in the Extender Window.

 

13.Add the Key Field to the calculation.

For a numeric field:

a.Select the Functions tab and select LNG_STR from the Function list to convert it to a string value.
b.Click Add to add the function to the expression string.
c.Click Fields and select the Table that contains the Key value for the window. Select the Field that contains the Key value. Click Add to add to the expression string.

For a string field:

a.Select the Functions tab and select STRIP from the Function list to remove the trailing spaces.
b.Click Add to add the function to the expression string.
c.Click Fields and select the Table that contains the Key value(s) for the window. Select the Field that contains the Key value. Click Add to add to the expression string.
14.Between each field in your key you will need to use the CAT operator to concatenate each of the key fields. Click CAT under the Operators section before adding the next field to the expression.
15.Repeat step 13-14 for each key field.
16.You will now have a concatenated key field that you can use in the upcoming section. Refer to the following example of what the finished expression might look like:

Key Calculated Field:  LNG_STR(SOP_LINE_WORK.Line Item Sequence) # STRIP(SOP_HDR_WORK.SOP Number)

17.Click OK to save the calculated field.
18.Select Calculated Fields from the Resources list and click New to open the Calculated Field Definition window.
19.Enter a Name for the calculated field.
20.Select the Result Type as String.
21.Select the Functions tab and select the User-Defined option.
22.Select System from the Core list and rw_TableHeaderString from the Function list.

 

light45

The rw_TableHeaderString function has five parameters: Product ID, Window ID, String Key Value, Numeric Key Value, and Field Number.

 

23.Click Add to add the function to the expression string.
24.Select the Constants tab and select Integer as the Type.
25.Enter 3107 as the Constant value and click Add to add it to the expression string.  3107 is the Product ID for Extender.
26.Select String as the Type.
27.Enter the Window ID for the Extender Window as the Constant value and click Add to add it to the expression string.
28.Click Fields and select Calculated Fields under Resources. Select the Field that contains the concatenated Key value that was setup using steps 10-17. Click Add to add to the expression string.
29.Select the Constants tab and select Integer as the type.
30.Clear the Value field and click Add to add a zero to the calculation.
31.Enter the number of the field from the Window in to the Value field and click Add.
32.Refer to the following example of what the finished expression might look like:

Extender Field 1:  FUNCTION_SCRIPT( rw_TableHeaderString 3107 “EXTRA_SOP_INFO” myKeyField 0 1 )

Extender Field 2:  FUNCTION_SCRIPT( rw_TableHeaderString 3107 “EXTRA_SOP_INFO” myKeyField 0 2 )

33.Click OK to save the calculated field.
34.Drag the calculated field on to the report.

 

light45

If you have a report that is using line item sequence numbers you will need to drag the line item sequence field on to the report and make it invisible.

 

35.Close the Report Layout window. Click Save.
36.Click OK to close the Report Definition window.
37.Select File >> Microsoft Dynamics GP to return to Microsoft Dynamics GP.

 

light45

You will need to set security to the modified report before you will be able to view. Refer to the Microsoft Dynamics GP System Setup Guide or help file for more information on setting security to modified reports.