Page 1 of 1

Setting a variable for use in preview in mobile designe

Posted: Wed Sep 02, 2015 4:42 pm
by agent005
Hello,

I have a report that has a variable called Param with default value of "123", and report just shows value of the variable Param on the page.
In my code before sending report to mobile report designer I'm setting the value to "1000".

Code: Select all

                stiReport1["Param"] = "1000";
                    StiMobileDesigner1.Report = stiReport1;
But when I do a preview from mobile designer - I see the value 123 and not 1000.
What is correct way to set the value of the variable so it gets picked up by the designer?

I'm using Ultimate 2015.1 version.

Thanks!

Re: Setting a variable for use in preview in mobile designe

Posted: Thu Sep 03, 2015 10:39 am
by Alex K.
Hello,

You can use the following code:

Code: Select all

stiReport1.Variables["Param"] = "1000";
For compiled report you can use your code:

Code: Select all

stiReport1["Param"] = "1000";
Thank you.

Re: Setting a variable for use in preview in mobile designe

Posted: Thu Sep 03, 2015 4:52 pm
by agent005
Thanks!
It looks like correct way is

Code: Select all

stiReport1.Dictionary.Variables["Param"].Value = "1000";
as stiReport1.Variable is null in my case.
Keep up great work!

Re: Setting a variable for use in preview in mobile designe

Posted: Fri Sep 04, 2015 6:01 am
by Alex K.
Hello,

Ok.
Let us know if you need any additional help.

Thank you.