Page 1 of 1

Populating DataSet

Posted: Thu Aug 25, 2011 7:22 pm
by MtheP
I am using SilverLight Server Client


ASP.NET

Code: Select all


Code Behind

Code: Select all

protected void Page_Load(object sender, EventArgs e)
        {
            var report = new StiReport();
            report.Tag = "Test";
            report.RegData("SharePoint", SharePointDataSourceFactory.SharePointDataSource);
            report.Dictionary.Synchronize();          
            this.SilverlightReport.Report = report;
        }        

        protected void SilverlightReportGetPreviewDataSet(object sender, StiWebDesignerSL.StiPreviewDataSetEventArgs previewDataSetEventArgs)
        {
            var dataTables = StiDataSourceHelper.GetUsedDataSourcesNames(previewDataSetEventArgs.Report).Keys.Cast().ToArray();
            foreach (var dataTable in dataTables)
            {
                SharePointDataSourceFactory.PopulateSharePointDataSource(dataTable);
            }

            var ds = SharePointDataSourceFactory.SharePointDataSource;
            previewDataSetEventArgs.PreviewDataSet = ds;
        }
The DataSets are available for me, however when I design a report and preview. No results are available (the dataset is populated). In fact the report seems to be a different one. i.e. if I place a box or something that does not get rendered too.

I do not

Populating DataSet

Posted: Fri Aug 26, 2011 7:45 am
by Andrew
Hello,

Possibly you need to register your data not as DataSource but as BusinessObjects.

Thank you.