2018.2.2: WebViewer Interaction - Quirk

Stimulsoft Reports.WEB discussion
Post Reply
vineet
Posts: 69
Joined: Fri Nov 10, 2017 3:12 am

2018.2.2: WebViewer Interaction - Quirk

Post 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;
}

}
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: 2018.2.2: WebViewer Interaction - Quirk

Post 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.
vineet
Posts: 69
Joined: Fri Nov 10, 2017 3:12 am

Re: 2018.2.2: WebViewer Interaction - Quirk

Post by vineet »

Where should I set this? When the report first loads or on Interaction?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: 2018.2.2: WebViewer Interaction - Quirk

Post 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.
vineet
Posts: 69
Joined: Fri Nov 10, 2017 3:12 am

Re: 2018.2.2: WebViewer Interaction - Quirk

Post by vineet »

Do you have an example of a sample project which has dynamic data loading upon changing variables on the WebViewer?
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: 2018.2.2: WebViewer Interaction - Quirk

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply