Page 1 of 1

Problem with StiMobileViewer

Posted: Wed Dec 07, 2016 3:48 pm
by nodo
Hello,

We are in the process of moving our Reporting solution from Silverlight to HTML.
So we want to use the StiMobileViewer in ASP.net for that (and also the StiMobileDesigner)

We want to keep using our custom backend to generate the report data and only display them using the ASP controls.
So basically we load the report template in the viewer and then, depending on the user entered variables, the report is generated in the back end, send back to the ASP site as a packed report document and then displayed in the viewer.

The issue is, only on the third call of OnGetReportData, is the rendered report actually shown in the viewer.
So the user has to click the "Submit" button 2 times until a result is shown. :shock:
I created a simple example that demonstrates this weird behavior.

I hope someone can point me in the right direction on how to fix this issue.

Re: Problem with StiMobileViewer

Posted: Fri Dec 09, 2016 2:07 pm
by Alex K.
Hello,

Unfortunately, it is not a simple way for implementing this task for StiMobileViewer. We recommend using StiWebViewer.
Please try to implement your task with the StiWebViewer and let us know about the result.

Thank you.

Re: Problem with StiMobileViewer

Posted: Mon Dec 12, 2016 9:23 am
by nodo
Thank you for your reply.

The reason I we StiMobileViewer instead of StiWebViewer is that we can't find a way to get the user entered variables with StiWebViewer.

The event arguments in OnGetReportData never contain the entered variables when using StiWebViewer. With StiMobileViewer at least that is working.

Any suggestions?

Re: Problem with StiMobileViewer

Posted: Mon Dec 12, 2016 3:25 pm
by HighAley
Hello.

You could use next code to work with request from user variables in the StiWebViewer:

Code: Select all

protected void StiWebViewer1_GetReportData(object sender, StiReportDataEventArgs e)
{
    var requestParams = StiWebViewer.GetRequestParams();
    var Variable1 = requestParams.Viewer.Variables["Variable1"];
        
        ...
}
Thank you.

Re: Problem with StiMobileViewer

Posted: Tue Dec 13, 2016 9:18 am
by nodo
Wow, thank you so much.

Looks like it is working now :)

Re: Problem with StiMobileViewer

Posted: Wed Dec 14, 2016 9:45 am
by HighAley
Hello.

We are always glad to help you.
Let us know if you need our help.

Thank you.