Populating DataSet

Stimulsoft Reports.Silverlight discussion
Locked
MtheP
Posts: 24
Joined: Mon Jul 18, 2011 7:37 am

Populating DataSet

Post 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
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Populating DataSet

Post by Andrew »

Hello,

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

Thank you.
Locked