I'm working on the sales invoice report and one of my tasks is to display the name and the phone no. of the responsible person in the header. If I use the data source "Sales Invoice Header"."Responsible Person" the code will be displayed (for e.g. AB for Antonio Bryant). Can someone explain to me how I can get the same informations for the resp. person like the informations for the "SalesPurchPerson"?
*This post is locked for comments
You need retrieve the table holding the Responsible Person Informatoin and Use that as the source expression. Check the code how to retrieve the Responsible Person just like SalesPerson, Payment Terms, Shipment Method.
Create a global variable on the record "Salesperson/Purchaser".
Add the desired fields of that table to the dataset of the report. You can select the new global variable as DataSource.
In the OnAfterGetRecord-trigger of the "Sales Invoice Header"-datasource add the following:
IF NOT SalesPurchPerson.GET("Sales Invoice Header"."Responsible Person") THEN CLEAR(SalesPurchPerson);
Add the new fields to the report layout.
It's Salesperson/Purchaser
What is the TableRelation of the field "Responsible Person"?
Sohail Ahmed
2
mmv
2
Amol Salvi
2