Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 3 Monaten
Letzter Beitrag:
vor 2 Jahren, 3 Monaten
Beteiligte Autoren:
James Smiths, Arie

How to add percentage in total in a table control

Startbeitrag von James Smiths am 21.04.2016 19:51

Hi all,

I like to know if it is possible to add another type of calculation (like percentage) other than the 3 automatic calculation provided in the table control.

I have searched in the online help and in this forum but can not find any example.

for example in a table that shows total sales by department monthly, I like to know if this can be done. Maybe can this be by programming ?

department sales profit profit %
shoes 150 75 50.00%
ladys 80 20 25.00%
toys 60 20 33.33%
sum 290 115 39.65%

Thank for your help.



Hi James,

afaik you can not. I tried it with a time-field too, in an app where we show the time spend on several project per day. And need a day-total.
I solved this by putting an extra tablecontrol below the originl one. Disabling all headers an so on, so it looks more or less like an extra row of the upper table. Looks quite well in my case.

You only have to deal with the user moving and resizing columns.
For resizing a column there's an event (at least in WD20)
For moving a coumn there's not. I'm using a combination of mousedown+move+up and tableinfoxy to catch the user actions. And check if a column has been move using TableEnumColumn and TableColumnSubscript. Then I move the column in the lower table as well with TableMoveColumn.

von Arie - am 22.04.2016 06:46
Hi Arie,

Thank you for your idea, that is a good solution. I was triying with extracting the totals of the columns, making the calculations and putting the total percentage in an edit control, Maybe PCsoft can consider putting extra automatic calculations or let the developer to program his own ones,

Thank you for your help.


von James Smiths - am 22.04.2016 15:37
Zur Information:
MySnip.de 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.