How to use Blockly design in the event script to obtain the Total of the data source in the grouped area or data band.

Stimulsoft Reports.JS discussion
Post Reply
s_sing1983
Posts: 2
Joined: Fri Feb 13, 2026 2:44 am

How to use Blockly design in the event script to obtain the Total of the data source in the grouped area or data band.

Post 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 .
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

Post 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.
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

Post 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
Post Reply