report Variables issue

Stimulsoft Reports.JS discussion
Post Reply
Ehsan
Posts: 100
Joined: Tue Jan 05, 2016 10:39 am
Location: Iran

report Variables issue

Post by Ehsan »

Hi
In my reports, when I click on headers with sort ability, my text boxes with variable value clear

thank you
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: report Variables issue

Post by HighAley »

Hello,

Could you describe your issue more detailed with samples?

Thank you.
Ehsan
Posts: 100
Joined: Tue Jan 05, 2016 10:39 am
Location: Iran

Re: report Variables issue

Post by Ehsan »

Hi
please see the attached sample report

you see my variable textbox on top of report,
then try to click on company header column,
you will see the my variable textbox content will clear,

thanks
Attachments
Demo.rar
sample project
(12.15 KiB) Downloaded 102 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: report Variables issue

Post by HighAley »

Hello,

The value is not stored in the dictionary and replaced with the default value on interactive sorting.
You should set the value of the variable with the next code:

Code: Select all

report.load(reportObject);
report.dictionary.variables.getByName("myVar").valueObject = "my variable";
Thank you.
Post Reply