Setting a variable for use in preview in mobile designe

Stimulsoft Reports.WEB discussion
Post Reply
agent005
Posts: 24
Joined: Mon Dec 22, 2014 3:05 pm

Setting a variable for use in preview in mobile designe

Post 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!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

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

Post 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.
agent005
Posts: 24
Joined: Mon Dec 22, 2014 3:05 pm

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

Post 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!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

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

Post by Alex K. »

Hello,

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

Thank you.
Post Reply