Page 1 of 1

How to register data from Dataview

Posted: Wed Feb 08, 2023 12:26 am
by jaimefuhr
Due to performance issues with a report, I am attempting to first fetch the data from a SQL database and then register it with the report.

The report displays in the Webviewer, but with no data except for the page header title.

I am using Reports.Web version 2022.2.1

Code: Select all

DataView data = GetReportData();

var report = new StiReport();
report.Load("CustomerData.mrt");

report.Dictionary.Databases.Clear();
//report.Dictionary.DataSources.Clear();

report.RegData(data);
report.Dictionary.Synchronize();

webViewer.Report = report;
The report has a connection and datasource called "ReportData". What I can't figure out is how to associate my data with the datasource.

Is there some example code? I followed this page without any success: https://www.stimulsoft.com/en/samples/r ... -from-code

Re: How to register data from Dataview

Posted: Thu Feb 09, 2023 10:39 am
by Lech Kulikowski
Hello,

Please check that connection, data sources, and column names are the same in the load report and in the data that is registered to the report.

Thank you.