Hi,
I'm using below code to generate report on run time:
using
(ReportBook reportBook =
new
ReportBook())
{
foreach
(Object input
in
inputValues)
{
InstanceReportSource reportSource =
new
InstanceReportSource
{
ReportDocument =
new
MyReport
{
DataSource =
new
JsonDataSource
{
Name =
"jsonDataSource1"
,
Source = genJsonDataSource(input)
// get json string from input object
}
}
};
reportBook.ReportSources.Add(reportSource);
}
ReportProcessor reportProcessor =
new
ReportProcessor();
InstanceReportSource instanceReportSource =
new
InstanceReportSource
{
ReportDocument = reportBook
};
RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource,
new
System.Collections.Hashtable());
// save report file from result
......
}
MyReport is a c# report class created by visual studio designer. It is designed with a json datasource named "jsonDataSource1" with some sample data in it. The report is generated as PDF but error is shown as in attached screenshot. I followed the instructions in https://docs.telerik.com/reporting/knowledge-base/missing-assembly-reference-when-using-jsondatasource by referencing Telerik.Reporting.WebServiceDataSource.dll in my project and make sure it's exist in the running directory. But the error persists. And when the dll is not referenced, I can preview the report without problem. So the symptom seems not exactly same as the document describes. The dll version is 14.2.20.1021. .Net 4.8.
What else need be done to fix this error?