PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD19] Automatic calculation on table with breaks problem
[WD19] Automatic calculation on table with breaks problem
Iniciado por guest, 07,ago. 2016 15:02 - 3 respuestas
Publicado el 07,agosto 2016 - 15:02
Hi,

I have :

a table with some breaks, filled by programming
some controls in the break Header (automatic sum of some fields)

So far, so good, the resulting table shows the sum in each header correctly.

Now I need to do some formatting on that values in the break, the result is shown in a seperate control inside the break header.

So after filling the table with all data I am looping through the table, read the control with the sum in it and make the formatting. Now that is working only for those lines which currently are visible in the table control. For all others the formatting failes, because the sum of that breaks are still not calculated !!!

I need to scroll down through the whole table, so that all breaks have been visible at least one time, then do the Loop and all is ok.

This procedure is, of course, not very practible.

Does anybody out there know a way to let all sums be calculated without interfering manually by scrolling. If there is no solution, I think I need to do the automatic calculation manually by programming and using the breaks just for optical reasons.

Thanks for any hints

Erik
Publicado el 07,agosto 2016 - 18:10
added that code in the 'Break Header display' section and in the 'Break footer display' section, as it was mentioned in the help.

This gives some improvement, but still not all lines are calculated in time.

Erik
Publicado el 08,agosto 2016 - 14:26
Hi Erik,

from your message, I suppose that your table is filled by programming.
In that case, I would think that a simple tableposition(table, lastline number) or tableselectplus of the same line should make all the calculation done (you can follow by a tableposition of he first line afterwaords, of course)

Best regards
Publicado el 08,agosto 2016 - 16:12
Hi Fabrice,

I did that yet. Then you have the funny situation, that the first few lines, which are visible at the initialization, and then last few lines, which are visible after tableselectplus are calculated and in between nothing. This is the same if I move the scrollbar only a part of the table or even if I move it too fast, then there a lacks of calculation.

My experiments now have spent time long enough, so I do the sum calculation in a separate table column and use that value in the break display section. Direct assignment of values which are not 'automatic calculated' works as expected.

Thanks anyway

Greetings

Erik