When using StiVariables, report is null in Designer Preview
Posted: Mon Jun 10, 2013 1:44 pm
In my silverlight designer, I am loading data in page load event.
Also I have preview_dataset event to load data again for preview purpose.
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.
Code: Select all
report.RegData(pd.ReportData());
StiWebDesignerSL1.Report = report;
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();
}
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.