Page 1 of 1
How to pass parameters in web dynamically?
Posted: Wed Jun 13, 2012 7:54 am
by rohit
hello,
I am trying to pass parametrs dynamically from textboxes to report,
I am unable to do it.. can anybody suggest??
How to pass parameters in web dynamically?
Posted: Wed Jun 13, 2012 7:59 am
by rahul
you can pass textbox values in reports like
report.Dictionary.Variables["varCust_ID"].Value = textboxname.text
here varCust_ID is your variable name,you have to create that variable in stimulsoft designer
How to pass parameters in web dynamically?
Posted: Wed Jun 13, 2012 9:31 am
by rohit
I am doing like this:
StiReport report = StiWebReportFx1.GetReport();
report.Compile();
report.CompiledReport.DataSources["DataSource1"].Parameters["@abc"].ParameterValue = Int32.Parse(TextBox1.Text);
StiWebViewerFx1.Report = report;
But when i use cache mode of reportviewer it displays the result same again and again... and if i use standard or RenderOnlyCurrentPage then it works but paging,%age level or download file not working and if change resolution of report, it refreshes the page and blank report displays as textbox value is not passed....
so what i do??
How to pass parameters in web dynamically?
Posted: Thu Jun 14, 2012 8:51 am
by Alex K.
Hello,
Please check the following code:
Code: Select all
StiReport report = StiWebReportFx1.GetReport();
report.DataSources["DataSource1"].Parameters["@abc"].Value = TextBox1.Text;
report.Compile();
StiWebViewerFx1.Report = report;
Thank you.
How to pass parameters in web dynamically?
Posted: Thu Jun 14, 2012 11:48 pm
by rohit
Thanks,
But can anybody tell me how we can do it in mvc(dynamically)????
How to pass parameters in web dynamically?
Posted: Thu Jun 14, 2012 11:55 pm
by rohit
And your code is wrong...
report.Compile();
comes before:
report.CompiledReport.DataSources["DataSource1"].Parameters["@clientid"].ParameterValue = Int32.Parse(TextBox1.Text);
if not then it wil give error that: object reference not set to instance...
Thanks.
How to pass parameters in web dynamically?
Posted: Fri Jun 15, 2012 5:51 am
by Vladimir
Hello,
We replied to you in the following forum topic:
http://forum.stimulsoft.com/Default.aspx?g=posts&t=6361
Thank you.