Friday, April 21, 2017
Microsoft Dynamics NAV 2016 – Business Chart
👋 Hi all,
Today i came across with different type of requirement, Sometime you might be show the inventory Location wise in the form of chart.
In this article, I’m going to discuss about Business Charts in detail and how you can create them.
Building Business Charts is one of the ways you can take advantage of the powerful charting capabilities in Dynamics NAV.
WHAT ARE BUSINESS CHARTS?
Business charts are based on Business Chart control add-in which is provided by the Microsoft.Dynamics.Nav.Client.BusinessChart.dll assembly.
As compared to other chart types, Business charts provide advanced functionalities such as:
· Displaying complex data that is calculated on a page.
· Allowing end users to filter data and drill down to the details from the chart
· Allowing dynamic filtering of data
· Being supported on Dynamics NAV Web client.
BUILDING BUSINESS CHARTS FOR ITEM LIST.
At the end of this blog, you will know how to build a simple Business chart which can be used as a factbox in the Item list page showing location wise Inventory.
This chart updates automatically when you move to any particular line on the item list page [See bellow screenshot].
Location wise Inventory Business Chart:
We need to mainly use Business Chart Buffer table (485) to build the business charts. This table holds chart related values and also has multiple functions pre-defined which can be used to build our chart on a page object.
Following objects are required to build Location wise Inventory Business Chart:
· A Query to calculate Location wise remaining quantity for all the items
· A Codeunit to use the above query result and prepare Business Chart Buffer table.
· A Page to display the chart.
To achieve this follow the steps:
1. Design a new Query object which shows Location wise remaining quantity for all the items. We will be using the query result as chart data.
a) Open Dynamics NAV development environment and click on Query and next click on New to design a new query
b) Specify the query DataItem and columns as shown below:
c) Save the query. (ex: ID-50027 and Name-Item Qty. By Location)
d) Run the query (50027) to see location wise total quantity of items.
2. Design a new CodeUnit to populate the Business chart buffer table with the above query result.
a) In the Dynamics NAV development environment, click on Codeunit and next click on New to design a new Codeunit.
b) In the codeunit designer, click on View–> Globals–> Functions tab to create a new function in the Codeunit. Enter the function name as GenerateInventoryByLoc and click on Locals button to enter parameters and variables for the function as shown in the below image:
c) Now in the Codeunit designer you see an new function trigger called GenerateInventoryByLoc. Enter the code as shown in the below image. The in-line comments within the Codeunit explains more about each line of code:
Save the Codunit (ex: ID- and Name-
3. Create a ”Items Qty. By Location Chart” page of CardPart type for displaying the Business Chart.
To create a CardPart page follow thr bellow steps:
Ø Open the Object Designer from Development Enviornment -> Click on Page Type -> Click New.
Ø Select on Create blank page and then Click on OK.
Ø Goto Page Properies and give SourceTable as 27 i.e. Item, PageType as CardPart, ID as per your range, in our demo i used 50027, Name Items Qty. By Location Chart. -> Save the Page.
Ø Now Design your page -> In our case -> Choose 1st Row as a
Type as Container, SubType as ContentArea, and Name as Container. In 2nd row
Type as Field, Name as BusinessChart -> Goto properties of this line and give the value for ControlAddIn. [Click on Lookup button in ControlAddIn Value and then select Microsoft.Dynamics.Nav.Client.BusinessChart]
Ø Now Save the Page and close this designer.
Ø See the bellow screenshot of Items Qty. By Location Chart.
4. Now design the Item List page i.e 31, and add a new factbox that we created earlier Items Qty. By Location Chart.
To achieve this we have to do some changes in Item List, follow the bellow procedures.
Ø Design the Item List Page from Object designer.
Ø In FactBoxAre add a new line for Items Qty. By Location Chart, and Map it.
Ø See the bellow screenshot for creating new factbox for Items Qty. By Location Chart.
Note: How you can Open Related page on Click of ”Business Chart” i’ll show you on next article, Thank You...
Credit goes to Subhidha
Hi all, Today i came across a different type of query,where Some customers may not want to use Departments menu available. We need to h...
Walkthrough: Implementing New Workflow Events and Responses Introduction Microsoft Dynamics NAV 2016 Workflows enable you to model rea...
New Workflows added in NAV 2017 Hi All, Today i came with amazing article in NAV 2017. First of all, I would like to say t...
DATA MIGRATION IN NAV 2016 FROM NAV 2009 Hi all, Today i came across with different type of requirement, Sometimes we need to move/Cop...
Hi, All Today one of my client wants to Export the data from NAV to MS Word, for that i prepared documentation, you can also use, its work...
Add a QR Code to a Dynamics NAV 2015/2016 in Report Header Hi All, This article will demonstrate how to add a QR Code to a NAV 2016. ...
Hi All, Today I'm going to describe how you can do the bellow requirements using NAV 2016. 1. Open Outlook Application. 2. Att...
Item Unit Price Change Approval Workflow in NAV 2017 Hi All, Today, I came with amazing article in NAV 2017 i.e. Setup workflow ...
FILTER OBJECT ID’s 👋 Hi all, Today i came across with different type of requirement, Sometimes you might be need to filter ob...
EXPORT DATA FROM SQL SERVER 2014 WIZARD Hi all, Today i came across with different type of requirement, Sometimes we need to move/C...