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 .
How to use Blockly design in the event script to obtain the Total of the data source in the grouped area or data band.
-
s_sing1983
- Posts: 2
- Joined: Fri Feb 13, 2026 2:44 am
-
Lech Kulikowski
- Posts: 7664
- Joined: Tue Mar 20, 2018 5:34 am
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
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.
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.
-
s_sing1983
- Posts: 2
- Joined: Fri Feb 13, 2026 2:44 am
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
In the JS version, Javascript cannot be executed, the page directly reports a JS error, int is not available, and sum is undefinedLech 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.