NAV 2016 Word report is generating extra 0

carsten_toft
Member Posts: 2
Hi,
I have made a report in NAV 2016 using Word and XML. Everything is very well, but I have one problem.
When "quantity" is added to the report, NAV writes "0" in all cells with no information. In the attached picture saying "with error" you can see that the "quantity" cell with no information is filled with "0".
In the picture "No error" I have shown how I would like it to look.
Can somebody help me?
I have made a report in NAV 2016 using Word and XML. Everything is very well, but I have one problem.
When "quantity" is added to the report, NAV writes "0" in all cells with no information. In the attached picture saying "with error" you can see that the "quantity" cell with no information is filled with "0".
In the picture "No error" I have shown how I would like it to look.
Can somebody help me?
1
Best Answer
-
no, only in C/SIDE in this case (simple common solution), i use in this way (no logic in Word, all in C(SIDE)
but.. i think that you can create functions in Word (macro) in word template.
you can modify XML an add also Javascript support... an so on..Roberto Stefanetti, MVP5
Answers
-
hi,
you can use this function Num2Str
called in fields of dataitem ex: Num2Str(Quantity)
Num2Str(IdecValue : Decimal) OtxtValue : Text[100]
IF IdecValue<>0 THEN BEGIN
OtxtValue:=FORMAT(IdecValue,0,'<Precision,2:2><Standard Format,0>');
END;Roberto Stefanetti, MVP0 -
Thank you for the fast answer.
Can this code be integrated directly in Word?0 -
no, only in C/SIDE in this case (simple common solution), i use in this way (no logic in Word, all in C(SIDE)
but.. i think that you can create functions in Word (macro) in word template.
you can modify XML an add also Javascript support... an so on..Roberto Stefanetti, MVP5
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K 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
- 320 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