Page 1 of 1
How to use Blockly design in the event script to obtain the Total of the data source in the grouped area or data band.
Posted: Fri Feb 13, 2026 2:52 am
by s_sing1983
Because the code in the event script cannot be fully executed in the JS environment, especially since the Total function is undefined.
How can I implement a statement like this c code`disct += (int)(Sum(DataBand1, root_data.DISCOUNT / 100.0) / Count(DataBand1))` in the After Print event using Blockly?plese gm xml code .
Re: How to use Blockly design in the event script to obtain the Total of the data source in the grouped area or data ban
Posted: Fri Feb 13, 2026 4:13 pm
by Lech Kulikowski
Hello,
You can use this expression directly in the Text component expression
disct = disct + (int)(Sum(DataBand1, root_data.DISCOUNT / 100.0) / Count(DataBand1))
Thank you.
Re: How to use Blockly design in the event script to obtain the Total of the data source in the grouped area or data ban
Posted: Sat Feb 14, 2026 1:19 am
by s_sing1983
Lech Kulikowski wrote: ↑Fri Feb 13, 2026 4:13 pm
Hello,
You can use this expression directly in the Text component expression
disct = disct + (int)(Sum(DataBand1, root_data.DISCOUNT / 100.0) / Count(DataBand1))
Thank you.
In the JS version, Javascript cannot be executed, the page directly reports a JS error, int is not available, and sum is undefined