Skip to main content

ActiveX Gantt Chart control in Dynamics Ax

This article exposes the very less used but two very important features; Gantt Chart Reporting (data analysis based on different kind of scheduling jobs) and use of ActiveX controls in Dynamics Ax. I hope you all understand what we can achieve through Gantt Charts. And ActiveX controls are small programs that provide add-on functionality to your application, usually it provides a GUI which can be placed on your forms / reports.

Note: This article is for advance Dynamics Ax users.

Dynamics Ax uses a third party ActiveX control to implement Gantt Charts. The ActiveX control is from NETRONIC, called VARCHART XGantt version 4.1.



So, for our Gantt Chart we will use this ActiveX, this way you will also understand "How to use third party ActiveX controls in Dynamics Ax?".

For reference, see below to know where this Gantt Chart ActiveX control is used in Dynamics Ax...
Open Project--Project Details form, click Activities button, on Hierarchy form click Inquiry--Gantt



Open Production Order--Gantt form





In this article, instead of writing my own code sample, I will refer Standard Dynamics Ax Shared Project Area for our understanding.



To use this Gantt Activex control, Dynamics Ax provides you some wrapper API classes. Search AOT--Classes for Gantt* classes. By seeing these class names you should be able to understand what they do.

How to use ActiveX control in Ax?

Create Ax form and add your Netronic ActiveX control from the ActiveX browser window.





How to change ActiveX control properties?


  • Open form in Visual Form Designer.


  • Select ActiveX control.

  • In properties window, select Custom property and click on browse button. This will open ActiveX control's property window.



  • To setup temp data tables (contains data to be displayed on the control), filters, calendars, layer colors, date-time lines etc check Objects tab.
  • To setup data tables you created in above step check Node tab.
That's it, just play with ActiveX properties and the project area I mentioned at the starting of this article. You are ready to use your newly added ActiveX control in Dynamics Ax.


Errors you might face while using Gantt ActiveX

1) When you are placing Gantt ActiveX on the form and you see error "Loading the interface... failed.".





Solution: It means you have not installed the ActiveX on your system yet. Install the required ActiveX and you should be good to go.

Feel free to post your feedback / comments / queries here.

Popular posts from this blog

Dynamics Axapta: Sales Orders & Business Connector

Well, again folllowing my same idea of writting close to nothing and pasting code, I'll paste in some code to create a sales order from some basic data and the invoice it. I'll try to explain more in the future. AxaptaObject axSalesTable = ax.CreateAxaptaObject("AxSalesTable"); AxaptaRecord rcInventDim = ax.CreateAxaptaRecord("InventDim"); AxaptaRecord rcCustTable = ax.CreateAxaptaRecord("CustTable"); rcCustTable.ExecuteStmt("select * from %1 where %1.AccountNum == '" + MySalesOrderObject.CustAccount + "'"); if (MySalesOrderObject.CurrencyCode.Trim().Length == 0) MySalesOrderObject.CurrencyCode = rcCustTable.get_Field("Currency").ToString().Trim(); string sTaxGroup = rcCustTable.get_Field("taxgroup").ToString().Trim(); //set header level fields axSalesTable.Call("parmSalesName", MySalesOrderObject.SalesName.Trim()); axSalesTable.Call("parmCustAccount", M

Passing values between form and class

Class name is EmplDuplication and Form is EmplTable . void clicked() {    MenuFunction mf;    args args = new Args();    ;     args.record(EmplTable);     mf = new menufunction(identifierstr(EmplDuplication), MenuItemType::Action); mf.run(args); } Meanwhile, in the main() method of the EmplDuplication class, we need to put this Axapta x++ code to get the datasource: static void main(Args args) {     EmplDuplication EmplDuplication; EmplTable localEmplTable; ;     if(args.record().TableId == tablenum(EmplTable)) localEmplTable = args.record();     ... }