I am using Telerik Reporting 12.1.18.620 in my ASP.NET (4.8) web application. It has been working fine for years but I suddenly encountered this error.
public void SetReport()
{
if (hidReportName.Value.Length > 0)
{
var reportPlaintext = hidReportName.Value.QsDecrypt();
var report = string.Format("TelerikReports.{0}, TelerikReports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", reportPlaintext);
try
{
Type reportType = Type.GetType(report);
IReportDocument reportDocument = (IReportDocument)Activator.CreateInstance(reportType);
Report = reportDocument as Report;
ReportViewer.ReportSource = (ReportSource)reportDocument; //Here is where the error occurs
}
catch (Exception)
{
throw new Exception(String.Format("Error loading Telerik report '{0}'", ReportName.QsDecrypt()));
}
}
I have searched extensively and tried to resolved this error but I am stymied. This is a huge blocker because I can't deploy the latest (non-reporting) code to production until this is fixed. I have been working on this for a week now with no luck.
Please help!