Expression varaibles are not updated

Stimulsoft Reports.JS discussion
Post Reply
kaveh
Posts: 7
Joined: Mon Jul 22, 2019 3:54 pm

Expression varaibles are not updated

Post by kaveh »

Hello,
I'm trying JS edition with HTML5 designer.
i created a variable (name=value) initialized by expression : jobsampleassayresults.Value
then i put a databand connected to datasource : jobsampleassayresults
when i try to print {value} on each row of databand it just repeats the first value of dataset and it's not updated according to dataset row.
i can not use the field value directly because i need some complex calcualtion.

Thanks
Attachments
2019-08-01_12h07_14.png
2019-08-01_12h07_14.png (177.54 KiB) Viewed 1410 times
rbravoz
Posts: 3
Joined: Sun Jun 16, 2019 1:09 am

Re: Expression varaibles are not updated

Post by rbravoz »

Kaveh,
I had that same problem. I solved it using a calculated column instead of the variable.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Expression varaibles are not updated

Post by Lech Kulikowski »

Hello,

Thank you for the provided solution.
kaveh
Posts: 7
Joined: Mon Jul 22, 2019 3:54 pm

Re: Expression varaibles are not updated

Post by kaveh »

rbravoz ,
Thanks for your solution, i tried it's working on databands, but
unfortunately i couldn't use it for BeforePrintEvent, it seems just variables can be used in events not the datasource fieldnames.
for eg. i have to set the left value of an object in BeforePrintEvent according to a field value.
if you suggest any solution for my problem, i really appreciate.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Expression varaibles are not updated

Post by Lech Kulikowski »

Hello,

Please try to set the ReadOnly property for the variable.

Thank you.
Attachments
ReportSample.mrt
(652.92 KiB) Downloaded 119 times
Post Reply