StiwebReport parameters
-
- Posts: 5
- Joined: Tue Apr 22, 2014 6:57 pm
StiwebReport parameters
Hello!
I am using Stimulsoft Ultimate And Visual Studio 2010 for a web project. I made a report and I send params (variables). I use the StiWebViewer but I always have to press the submit button for reload and execute the report with the params. By the way, when I choose save in any format (PDF,Word, XLS, etc) the report is downloaded without the value params.
In my Default.aspx I have the next code:
protected void Page_Load(object sender, EventArgs e)
{
StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiMySqlAdapterService());
StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiMySqlDatabase());
StiReport report = StiWebReport1.GetReport();
report["reporte_id"] = (Request.QueryString["reporte_id"]!= null)?Request.QueryString["reporte_id"]:"" ;
StiWebViewer1.Report = report;
}
Can you help me? How Can I send the params value when I save my report? How Can I print the params in the box of params?
Thank you.
I am using Stimulsoft Ultimate And Visual Studio 2010 for a web project. I made a report and I send params (variables). I use the StiWebViewer but I always have to press the submit button for reload and execute the report with the params. By the way, when I choose save in any format (PDF,Word, XLS, etc) the report is downloaded without the value params.
In my Default.aspx I have the next code:
protected void Page_Load(object sender, EventArgs e)
{
StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiMySqlAdapterService());
StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiMySqlDatabase());
StiReport report = StiWebReport1.GetReport();
report["reporte_id"] = (Request.QueryString["reporte_id"]!= null)?Request.QueryString["reporte_id"]:"" ;
StiWebViewer1.Report = report;
}
Can you help me? How Can I send the params value when I save my report? How Can I print the params in the box of params?
Thank you.
Re: StiwebReport parameters
Hello,
Please try to use the Compile() method before pass the value for parameters.
Also please try to set the RenderMode="AjaxWithCache" property for the WebViewer.
And please try to correct code in Page_Load event:
Thank you.
Please try to use the Compile() method before pass the value for parameters.
Code: Select all
...
report.Compile();
report["reporte_id"] = (Request.QueryString["reporte_id"]!= null)?Request.QueryString["reporte_id"]:"" ;
...
And please try to correct code in Page_Load event:
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// your code
}
}
-
- Posts: 5
- Joined: Tue Apr 22, 2014 6:57 pm
Re: StiwebReport parameters
Thank you! But now I have another problem. I set a Table of Content (I took the example with the BeginRender and EndRender), but this is not execute at first time. How Can I solve it ?
Greetings!
Greetings!
Re: StiwebReport parameters
Hello,
Please try to use the Render() method. If it is does not help please send us a sample project which reproduce the issue for analysis.
Thank you.
Please try to use the Render() method. If it is does not help please send us a sample project which reproduce the issue for analysis.
Thank you.
-
- Posts: 5
- Joined: Tue Apr 22, 2014 6:57 pm
Re: StiwebReport parameters
Thank you for your help!!! It was very good to me.
Re: StiwebReport parameters
Hello,
We are always glad to help you!
Let us know if you need any additional help.
Thank you.
We are always glad to help you!
Let us know if you need any additional help.
Thank you.