Using Batch Number (AMBatch) in Custom Reports
Overview
When creating or customising reports that reference Manufacturing batch information, some users may find that Batch Numbers (AMBatch.BatNbr) do not populate in report parameters or selectors.
Cause
The Batch Number field has a required dependency on another key field: AMBatch.DocType. If DocType isn’t included as a parameter, the selector cannot return any batch numbers.
Fix
To ensure Batch Numbers are returned correctly in custom reports:
-
Add AMBatch.DocType as a report parameter.
-
Update the Batch Number selector to reference both fields:
Report.GetFieldSchema('AMMTran.BatNbr,DocType') 
For an example of connected parameters, see the SOOrder.OrderNbr parameter in SO641010.rpx