deepthi gollapalli
deepthi gollapalli

Reputation: 131

Reference to type 'IDataSource' claims it is defined in 'System.Web', but it could not be found

I was trying to render rdlc reports in .net core 2.0 and found System.Web is not yet available in .net core. So I started a separate .net standard 2.0 project with in the same solution for the task. Then I was again facing issue with 'ReportDataSource' which in turn is System.Web library. I tried to google for the same but found no luck with the information related to this. Someone please help me to find the possibilities to render rdlc in my .net core project.

<img>

Upvotes: 9

Views: 2860

Answers (2)

Yetimandaddy
Yetimandaddy

Reputation: 69

_reportViewer.LocalReport.DataSources.Add(new ReportDataSource()
{
    Name = "dsVendorSummary", 
    Value = DT5
});

Upvotes: 1

zholinho
zholinho

Reputation: 520

You can try it like this, it works:

var rds = new ReportDataSource();
rds.Name = "DeviceSalesReport";
rds.Value = result;

dataSource.Add(rds);

Upvotes: 14

Related Questions