Report 08-2016 - MS Dynamics NAV Guru

Download Report

Transcript Report 08-2016 - MS Dynamics NAV Guru

Post List
MS Dynamics NAV Guru
A Tribute to all Dynamics NAV Gurus like MVPs and others
Word Layout reports data control by C/AL
Posted on August 11,2016 by NavGuru
<span title=”alcuni mi hanno chiesto (sia su Dynamics Community che su Mibuso) come gestire nei report NAV con Word
Layout, in particolare come utilizzare proprietà per nascondere il valore 0 od altro
“>Some have asked me (both on Dynamics Community and Mibuso) how to use in NAV Word Layout reports property
to hide the value 0 or other values in fields under conditions.
Sample of question: “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, writes NAV “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”. <span title=”In the picture "No
error" I have shown how I would like it to look.
“>In the picture “No error” I have shown how I would like it to look.
Question <span title=”rif http://forum.mibuso.com/discussion/67111/nav-2016-word-report-is-generating-extra-0
“>ref. http://forum.mibuso.com/discussion/67111/nav-2016-word-report-is-generating-extra-0<span title=”rif
http://forum.mibuso.com/discussion/67111/nav-2016-word-report-is-generating-extra-0
“>
Answer
No, only in C / SIDE in this case (simple common solution), the use in this way (no logic in Word, all in C (SIDE) .. but .. i
think That you can create functions in Word (macro) <span title=”in word template. you can modify XML an add also
Javascript support… an so on..
“>in word template. you can modify an XML add Also JavaScript support … an so on ..
Some functions can be used with C / AL
<span title=”con queste funzioni è possibile simulare ciò che viene fatto dalle proprietà di visibilità del report RDLC o dalle
Funzioni VBNET inserite nel report (Public Functions).
“>With these sample functions you can simulate what is done by the visibility property of the RDLC report or by
VBNET Functions included in the report (Public Functions on CODE section of reports).
<span title=”con queste funzioni è possibile simulare ciò che viene fatto dalle proprietà di visibilità del report
RDLC o dalle Funzioni VBNET inserite nel report (Public Functions).
“>Examples
Num2Str (IdecValue: Decimal) OtxtValue: Text [100]
IF IdecValue <> 0 THEN BEGIN
OtxtValue: = FORMAT (IdecValue, 0, ‘<Precision, 2: 2> <Standard Format, 0>’);
<span title=”END;
“>END;
Num2Str2 (IdecValue: Decimal) OtxtValue: Text [100]
<span title=”OtxtValue:=FORMAT(IdecValue,0,'<Precision,2:2><Standard Format,0>’);
“>OtxtValue: = FORMAT (IdecValue, 0, ‘<Precision, 2: 2> <Standard Format, 0>’);
Int2Str (inValue: Integer) OtxtValue: Text [100]
IF inValue <> 0 THEN BEGIN
OtxtValue: = FORMAT (inValue);
END;
..
etc etc.
Posted in:Roberto Stefanetti | Tagged:NAV 2015,NAV Reporting,Senza Categoria,Word Layout | With 0 comments