Page 1 of 1

When using StiVariables, report is null in Designer Preview

Posted: Mon Jun 10, 2013 1:44 pm
by bobsov
In my silverlight designer, I am loading data in page load event.

Code: Select all

report.RegData(pd.ReportData());
        StiWebDesignerSL1.Report = report;
Also I have preview_dataset event to load data again for preview purpose.

Code: Select all

protected void PreviewDataSet_Event(object sender, StiWebDesignerSL.StiPreviewDataSetEventArgs e)
    {
        var report = GetReport();
        var pd = new ProcessData(report, "/api/reporting/run");
        e.PreviewDataSet = pd.ReportData();
       
    }
This works great if I don't have any variables defined. As soon as I define variable, in the preview dataset event, e.Report is null. In StiWebDesignerSL.cs file, it calls a different method (ServerPrepareRequestFromUserVariables) to process which invokes previewdataset event first. Any idea why report is null and how can I make sure it works when variable is declared.

The variable is trying to load values from data column in the dropdownlist. In silverlight preview screen, because of report being null, the variable is disabled and do not show dropdown list.

By the way, if I save this report as is and go to my html5 viewer, this variable is shown as dropdownlist with values from data column and works as expected. It just does not work when in silverlight designer preview.

Any help would be appreciated.

Re: When using StiVariables, report is null in Designer Prev

Posted: Tue Jun 11, 2013 6:13 am
by bobsov
I did further digging on this and found that when variable is used, the report string does not contain databand info. I am not sure why databand is missing.

Re: When using StiVariables, report is null in Designer Prev

Posted: Tue Jun 11, 2013 10:15 am
by HighAley
Hello.

There were several improvements.
Please, check the latest prerelease build that is available on our site.
If it will not help, send us a sample project which reproduces the issue.

Thank you.

Re: When using StiVariables, report is null in Designer Prev

Posted: Tue Jun 11, 2013 2:21 pm
by bobsov
This is found using both 2013.1 and latest pre-build. I think I have discovered why this is an issue and will run by you guys if I am able to resolve this.

Re: When using StiVariables, report is null in Designer Prev

Posted: Tue Jun 11, 2013 11:05 pm
by bobsov
I figured this out. I had to modify some parts of the source code to make it to work. Basically, when encoded string is received for stimulsoft_viewer1 query string, I had to process it, and create report first, then call InvokePreviewDataset method. This trick worked for me and now I am able to see variables and preview report working together fine.

Thanks Aleskey for looking into it.

Re: When using StiVariables, report is null in Designer Prev

Posted: Wed Jun 12, 2013 11:18 am
by HighAley
Hello.

We are glad to work with such costumers.
Let us know if you will need any additional help.

Thank you.