table auto calculations [WD21]

Startbeitrag von iso am 31.05.2016 14:25


I have a number of table controls which have quite a lot of records 20K+ they take a few seconds to populate which is fine, but the auto calculations (sum and counter) take a little longer, i have impatient users of the program clicking on things before these have been calculated. Is there a command to show when this has finished, table end initialization doesnt take into account the auto calculations.




Hi iso,

The calculations can be performed by programming so should be within your control. Not tried it myself, but you could pop-up a "Calculating..." message box, set the calc(s) going and close the pop-up when the calc(s) are complete?

von DarrenF - am 31.05.2016 15:12

Depends how you are getting your data.
I run a query and store the result in an array.
My table controls are bound to the queries.
Calculations are then carried out against the query - blisteringly quick as all in memory especially if you can incorporate associative arrays.

Finish with TableDisplay() and popuplate, if you have not already done so, the controls displaying the counts.

As this is all done in a single procedure you can use HourGlass() to prvent users doing what users always do when they are impatient.

von DerekT - am 31.05.2016 19:00
thanks guys

i added these lines to the table end of init,,

NoOf is int = myself.COL_IntStudentId[rowCount]

even though im using the auto calculations in the COL_IntStudentId which means this is calculated anyway. i still need the above code to know when to close the wait window.



von iso - am 01.06.2016 09:21
I didn't test this but it may work.
init code
yourtable..TotalsEnabled = False

end of int code
yourtable..TotalsEnabled = true

von Paulo Oliveira - am 01.06.2016 09:39

I couldn't find out columnCount/columnSum/..Avg in a row

A B C columnTotal
10 20 30 60
1 2 7 10

Appreciated if you could point out some tips and thx in advance



von kingdr - am 01.06.2016 12:06
Hi Paulo

Yes i had actually tried that before it didn't work sadly.



von iso - am 02.06.2016 06:58
Zur Information: hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.