In order to add a DMS user field to a report, each user field needs to be a subreport. A subreport is an ordinary report which can be placed on one of the data bands. You can think of a subreport as a report within a report.
To add a user field using a subreport, perform the following steps:
1.Click on the left side icon to add a sub report.
2.Drop the subreport bar on the report Page1 where you want the user field to appear. The report designer will automatically add a new page called "Subreport1" and the editor will position you on the new sub report page. As you add each new subreport, it will be numbered as Subreport1, Subreport2, Subreport3, etc.
3.On the subreport page, add a master data band. The following window will appear:
4.Select Job User Fields. Then select the Filter prompt by clicking on the … box at the end of the prompt.
5.The Expression Editor will be displayed. You can select the OrderID fields from Jobs and User Fields tables or enter the required code to the Expression box at the bottom of the window. In the example below, the information required to retrieve the Inventory Abbrev job user field has been entered:
The OrderID is required so that the correct job is retrieved for the Job User Field. The name of the job user field is required to access the correct user field. The job user field Prompt is the name you have given the user field (i.e. Inventory Abbrev) and it is case sensitive and must match exactly how it is entered in DMS. The example expression entered is below:
(<Job User Fields."OrderID">=<Jobs."OrderID">) and (<Job User Fields."Prompt">='Inventory Abbrev')
For each user field, you create a new subreport and would change the prompt name. For example, to get the user field Revision you would use:
(<Jobs."OrderID">=<Job User Fields."OrderID">) and (<Job User Fields."Prompt">='Revision)
6.Click OK to close and save the expression.
7.Depending on the user field type, select the corresponding Job User Field data variable from the right side of the window under Job User Fields. That is:
1.If the job user field is a Text/Numeric input, select Text
2.If the job user field is a Lookup type, select LookupItem
3.If the job user field is a Notes type, select Notes
4.If the job user field is a Date type, select Date
8.Make sure to position the selected job user field variable to the left side of the master data band. Also, you may wish to set the length of the field.
9.Click the Save button on the top menu, and try a test run.
10.Save the report. It is suggested that after adding each new subreport, you save the report and run a test to verify that it works as expected and catch any typos.
The User Field Definitions window can be used to look up and verify the Job User Field type as in:
If everything looks correct, but you are not seeing the user field on your report, make sure that the position of the subreport on Page1 of the report is not outside the boundaries of the data band. In the example below, the subreport is within the data band:
In the report example below, the subreport is outside of the data band and thus may not appear on the report: