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?
1
Answers
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;
Can this code be integrated directly in Word?
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..