How to register data from Dataview

Stimulsoft Reports.WEB discussion
Post Reply
jaimefuhr
Posts: 8
Joined: Wed Sep 15, 2021 5:10 pm

How to register data from Dataview

Post 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
Lech Kulikowski
Posts: 6240
Joined: Tue Mar 20, 2018 5:34 am

Re: How to register data from Dataview

Post 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.
Post Reply