Hi there,
What is the correct way to properly process the interaction parameters and assign a new report to the webViewer?
I have Stimulsoft.Web 2018.2.2, ASP .NET WebForms --> StiWebViewer control. There are a couple of filter parameters appearing at the in the viewer. When the user changes these, I want the report to send me the updated filters and then I would dynamically fetch new data for the report and show on the viewer.
Now, I am using the following method to handle this. The problem is, the report gets rendered twice (confirmed by monitoring its onrendering event), so takes longer to appear on the viewer, twice the amount of time. But the filtered report then shows up properly on the viewer. Is this the correct way to supply the new report?
The only other method I have is the GetReport method which gets the compiled report and attaches it to the StiWebViewer1's Report property.
protected void StiWebViewer1_Interaction(object sender, StiReportDataEventArgs e)
{
if (e.Action == StiAction.Variables)
{
// The values of the variables passed from the client
Hashtable variables = e.RequestParams.Interaction.Variables;
var r = Business.GetCompiledReport(variables);
StiWebViewer1.Report = r;
}
}
2018.2.2: WebViewer Interaction - Quirk
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: 2018.2.2: WebViewer Interaction - Quirk
Hello,
Please try to set the RequestParameters option to true for the report. In this case, the report will be rendered only after Submit parameters.
Thank you.
Please try to set the RequestParameters option to true for the report. In this case, the report will be rendered only after Submit parameters.
Thank you.
Re: 2018.2.2: WebViewer Interaction - Quirk
Where should I set this? When the report first loads or on Interaction?
Re: 2018.2.2: WebViewer Interaction - Quirk
Hello.
The Request Parameters property is a property of the report.
You could set it in the Designer or with your code before loading the report.
Thank you.
The Request Parameters property is a property of the report.
You could set it in the Designer or with your code before loading the report.
Thank you.
Re: 2018.2.2: WebViewer Interaction - Quirk
Do you have an example of a sample project which has dynamic data loading upon changing variables on the WebViewer?
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: 2018.2.2: WebViewer Interaction - Quirk
Hello,
Please check the following sample:
http://demo.stimulsoft.com/#Net/Paramet ... ingCountry
Thank you.
Please check the following sample:
http://demo.stimulsoft.com/#Net/Paramet ... ingCountry
Thank you.