Add customer Phone Number in Report
RMolenaar
Member Posts: 94
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
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
NAV 7.1
0
Comments
-
Hi Molenaar,
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,
Bogdan0 -
Hello 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.Microsoft Dynamics NAV 2013 R2
NAV 7.10 -
Hi Molenaar,
Yes it will be .GET function:
Customer.GET("Sales Header"."Sell-to Customer No."); or Customer.GET("Sales Header"."Bill-to Customer No.");0 -
Thank you Bogdan!. I know how to add a field into the report and works great, however...
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,
RobMicrosoft Dynamics NAV 2013 R2
NAV 7.10 -
To remove the empty values - you can use the funtction COMPRESSARRAY.
Ex:
COMPRESSARRAY(CustAddr);0 -
Could you show Expression of TextBox where you output the customer number, and also field position?0
-
Hi,
I solved the problem of showing the PhoneNo when printing.
ThanksMicrosoft Dynamics NAV 2013 R2
NAV 7.10
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 323 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
