oForm=createobject('form1') oForm.Show Read events #INCLUDE "mschrt20.h" Define CLASS form1 AS form Top = 0 Left = 0 Height = 520 Width = 790 DoCreate = .T. Name = "Form1" Add OBJECT mschart AS olecontrol WITH ; Top = 10, ; Left = 5, ; Height = 500, ; Width = 780, ; Name = "MsChart", ; OleClass = 'MSChart20Lib.MsChart' Procedure Init Select country,sum(maxordamt) ; from customer ; group by 1 ; into cursor crsChart lcTemp = Sys(2015)+".tmp" Copy To (lcTemp) type delimited with "" with tab _cliptext = FileToStr(m.lcTemp) Erase (m.lcTemp) Thisform.mschart.Editpaste Endproc Procedure QueryUnload Clear events endproc EnddefinePS: MSGraph and MSExcel are a little heavy to display charts on a form.