Monday, February 4, 2008

Integerating Fusion Chart with Dynamics Axapta 4 (Part One)

This tutorial will guide you to view beautiful Fusion Chart on Axapta. Before you follow this tutorial you need to install Flash player on our system or you can click here to download Flash.ocx then you register it to your system using regsvr32 command. You need to download Fusion Free Chart here, copy and paste Chart folder from Fusion Free Chart folder to C:\, create new folder name Data on C:\ and make sure you have this folder structure. Oouch I almost forgot, Fusion Free Chart read parameter from xml file to view data on chart that’s why we need folder Data under the Chart folder.



OK now we start to build the application by creating a Group name IntegeratigFusionChart, then create a new Group name Forms and ProjectGroupType Forms. Create new Form name CustInvoicedList then fill caption with “Integerating Fusion Chart on Axapta”.


Create new Group on Form CustInvoiceList fill the name with “GroupParameter” and Caption with “Parameters” then add new control StringEdit fill the name with “CustAccount” and ExtendedDataType with “CustAccount”, add new control DateEdit fill the name with “FromDate”, Label with “From date” and ExtendedDataType with “TransDate”, add new control DateEdit fill the name with “ToDate”, Label with “To date” and ExtendedDataType with “TransDate”.



Continue to the next step, create new Group on Form CustInvoiceList fill the name with “GroupViewer” and Caption with “Fusion chart viewer” then add new control ActiveX fill the name with “FusionChartViewer”.



Done with making the interface, now create new method on form name initChart() then insert below code to initChart() method :



First marked source mean to write empty data to DataCustInvoiced.xml file and the second marked source send some information to chart about the parameter file path and set the width and height of chart.

Next step, create new method on form name amount2str(), this method will convert amount to string format for Fusion Free Chart parameters. Insert below code to amount2str() method :



Create new method on form name writeXML(), this method will generate xml file that contains parameter for Fusion Free Chart, insert below code to writeXML() method :





Create new method on form name redrawChart(), this method will refresh the chart viewer, then insert below code to redrawChart() method :



Continue to next step by init() on form, then insert below code :



Create new ButtonGroup on Group GroupParamter, then add new control Button fill the name with “ButtonRefresh” and Text with “Refresh”.



The last step is override method Clicked() on ButtonRefresh(), then insert below code to Clicked () method :



Wooogggh try to input the parameter and see how it works.

10 comments:

Unknown said...

hoo..
nice, keep up the good work

dari indonesia yah?
salam

Anonymous said...

Iya saya dari indonesia, thanks for the comment.

Anonymous said...

Hi,

Great job!.

You can use ChartFx component used in AX. ChartFx component provides even simpler inetrface where you can change the type of charts, dimensions etc.

e.g. See AX > Inventory > Periodic > Bill of materials > Calculation > select a record > press Summary button.

Try ChartFx component which requires less code to generate the charts.

Regards,
kris

Bali Villas said...

Very interesting post, to be honest I have never heard too much about it. But now at least I know a deeper insight about it. Thanks!

Villas in Canggu Bali said...

Hi, i am learning Axapta in the last 2 weeks. Now i know where to learn more. Thank you.

Anonymous said...

The name Rolex Yachtmaster watches and Franck Muller watches have a tilt towards the modern in name and design. replica Cartier may not be, in traditional concept the best appellation for a luxury product. Rolex DateJust replica name is the best example of the change that taste has undergone recently.

First of all what does Rolex Day Date II watches stands for in the understanding of people who have not been initiated into fabulous world of Patek Philippe watches ? Rolex Air King replica watches were a kind of German sub-marines used during the first and second world war. A glance into the history of the replica Bell & Ross show that the concept of the present day Rolex Daytona replica originated some 70 years ago. The Italian replica Rolex Datejust maker Rolex Day Date watches made these initial designs of replica Tudor for the officers of the Italian Navy. However, the designs of those watches were kept intact and his son Italo Fontana founded the Corum replica watches company in the year 2000. The original as well as the replica Hublot watches were well received by the world of luxury.

menurunkan berat badan said...

thanks for the info.

Bali Villas said...

Wow. really nice.. Bali Villas

wedding dresses 2011 said...

Thanks for the post

Claire Divas said...

Nice post