Posts

Showing posts with the label Dynamics NAV 2018

How to find the difference between two dates and return the corresponding number of months in Dynamics NAV

Image
You could use a variable Calendar > Record > Date IF ( FromDate <> 0D ) and ( ToDate > FromDate ) THEN BEGIN Calendar . RESET ; Calendar . SETRANGE ( "Period Type" , Calendar . "Period Type" :: Month ); Calendar . SETRANGE ( "Period Start" , FromDate , ToDate ); Months := Calendar . COUNT ; END ELSE Months := 0 ; The problem with this type of code is 01 Jan 07 to 01 Feb 07 will return 2 Months. When it is only 1 month 1 day! 31/01/06 and 01/02/06 will be 1 month between 01/01/06 and 28/02/06 will be 2 Months Date Difference in months.

How to design graphical RDLC report in Microsoft dynamics NAV 2018

Image
First we need to create a table for the graphical report. Lets create a new table which will contain budget and actual amount of different accounts with the following fields: Save the table as  Graphical Report Table. Now  i nsert following data into the table for example: Our table is ready for the Report. Now go to report section and click new to create a new report. In the report designer enter the table number or name as DataItem. Then select the table fields under the DataItem. Now select  View > Layout from main menu. The report layout will be open in visual studio. (If visual studio is not installed in your computer SQL report designer may open but I recomand Visual Studio for RDLC report design). in the visual studio report design choose chart from toolbox menu. Then create a chart you want from the list. Here i choose the first one for this example. In the chart data section select Actual and Budget field Sum in Value section. And Name...