Hello,
First of all I want to say I am not very familiar with Reports in NAV. Only very basic knowledge.
I want to change a Report in Visual Studio. I want to add a Customer Phone No.
Must be very simple I would say :shock:
I added a DataItem "Customer" with a link to Sales Header and a column with Customer."Phone No." (image1)
After that I started Visual Studio and added a field with Expression =Fields!PhoneNo_Customer.Value (image2)
Back to Development enviroment and Compiled.
When I run the Report a lot is missing on the Report (image3)
Could you please help me a bit further in the right direction?
Thank you
Microsoft Dynamics NAV 2013 R2
NAV 7.1
0
Comments
You can get Customer record variable in the "Sales Header - OnAfterGetRecord()" trigger. Also add in the Report Dataset new column with Customer."No." data source. (Can be add to the <Sales Header> or <PageLoop> Data Item). And don't create new DataItem for the Customer.
In the Visual Studio Layout use GetData and SetData functions for value output.
You can look this How Do I video: https://www.youtube.com/watch?v=dievcKyhoWU
Best Regards,
Bogdan
I really appreciate your help. I only had a basic Report training without C/AL codes.
Could you tell me how to add the trigger in the Sales Header - OnAfterGetRecord()?
I think it will be the .GET function?
Thanks again.
NAV 7.1
Yes it will be .GET function:
Customer.GET("Sales Header"."Sell-to Customer No."); or Customer.GET("Sales Header"."Bill-to Customer No.");
When I Preview the report the field is shown OK but when I print the report the field is not printed?
Another question:
Is is possible to add the Telephonenumber in the CustAddr?
When I put my Expr. field below the CustAddr fields in the report I will have some white spaces. (image4)
Best Regards,
Rob
NAV 7.1
Ex:
COMPRESSARRAY(CustAddr);
I solved the problem of showing the PhoneNo when printing.
Thanks
NAV 7.1