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.