>>lparameters tnOption >>local loMessage, loWait, lcNotify, lcInsertCmd >>local lnI, lnH, lnM, lnO, lnTotal >>store 0 to lnI, lnH, lnM, lnO, lnTotal >> >>lcNotify = set('notify') >>set notify on >>set talk on >>set talk window >> >>with thisform >> >> if not .lSilentMode >> loMessage = createobject("cWaitMessage", "Getting Data...") >> loWait = createobject("cMessage", "Getting Data...") >> .WaitMode(.t.) >> endif >> >> do case >> case m.tnOption = 1 && by Queue >> GetQueuesDistribution() >> case m.tnOption = 2 && by Clients >> GetClientsDistribution() >> case m.tnOption = 3 && by Product Line >> GetProductLineDistribution() >> case m.tnOption = 4 && by Status >> GetStatusDistribution() >> endcase >> >> if m.lcNotify = 'OFF' >> set notify off >> endif >> set talk off >> >> .oXTab.RunXTab() >> >> zap in curStats >> >> LOCAL i,h,m,o && surrogate fields >> STORE 0 TO i,h,m,o >> >> insert into curStats (cFullName, I, H, M, O, nTotal); >> SELECT I,H,M,O, I+H+M+O FROM curStatistics && ONE CHAR FIELD'S NAME is a terrible choice >> >> select curStats >> >> sum I, H, M, O, nTotal ; >> to .txtITotal.value ; >> , .txtHTotal.value ; >> , .txtMTotal.value ; >> , .txtOTotal.value ; >> , .txtTotal.value >> >> go top >> >> .WaitMode(.f.) >> .refresh() >>endwith >>>