CountData property not working

Stimulsoft Reports.JS discussion
Post Reply
benfc123
Posts: 6
Joined: Wed Dec 11, 2019 6:18 pm

CountData property not working

Post by benfc123 »

I have a report that needs to print the DataBand the number of times equal to the value of the OnHand column

In the Before Print event on the DataBand, I have the following code DataBand1.CountData = products.onhand;
I have also tried {DataBand1.CountData = products.onhand;} and {DataBand1.CountData = products.onhand} and DataBand1.CountData = products.onhand

I have seen the above syntax in other posts on the forum, except they are 4-5 years old. Has the syntax changed any?

The result is each band prints only once no matter which syntax I use.
benfc123
Posts: 6
Joined: Wed Dec 11, 2019 6:18 pm

Re: CountData property not working

Post by benfc123 »

We figured this out, we had to use JS syntax
DataBand2.countData = parseInt(products.getData("onhand"));
Lech Kulikowski
Posts: 7291
Joined: Tue Mar 20, 2018 5:34 am

Re: CountData property not working

Post by Lech Kulikowski »

Hello,

Thank you for the information.
Post Reply