Page 1 of 1

2018.2.2: WebViewer Interaction - Quirk

Posted: Wed Jun 06, 2018 8:00 am
by vineet
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;
}

}

Re: 2018.2.2: WebViewer Interaction - Quirk

Posted: Fri Jun 08, 2018 7:06 am
by Lech Kulikowski
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.

Re: 2018.2.2: WebViewer Interaction - Quirk

Posted: Fri Jun 08, 2018 7:15 am
by vineet
Where should I set this? When the report first loads or on Interaction?

Re: 2018.2.2: WebViewer Interaction - Quirk

Posted: Fri Jun 08, 2018 11:26 am
by HighAley
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.

Re: 2018.2.2: WebViewer Interaction - Quirk

Posted: Tue Jun 12, 2018 2:38 am
by vineet
Do you have an example of a sample project which has dynamic data loading upon changing variables on the WebViewer?

Re: 2018.2.2: WebViewer Interaction - Quirk

Posted: Wed Jun 13, 2018 8:49 pm
by Lech Kulikowski
Hello,

Please check the following sample:
http://demo.stimulsoft.com/#Net/Paramet ... ingCountry

Thank you.