Hi Telerik, I am creating Telerik Report using Telerik REST Services. I created my report and now I want to use it in my company project. For that I created reference of Reporting project to my Company' Project and called the Constructor of Report. Here is code for that:
string ReportsPath = @"C:\ReportsDownload";
string reportFileName = String.Format("FormReport-{0}.pdf", frm);
string reportWebPath = String.Format("/Reports/{0}", reportFileName);
var formReport = new AQSRestServiceObject.AQSReport(); // Calling Report Constructor
formReport.ReportParameters["FormNumber"].Value = 12476;
var processor = new ReportProcessor();
var result = processor.RenderReport("PDF", formReport, null);
using (var pdfStream = new MemoryStream(result.DocumentBytes))
using (var reportFile = new FileStream(Path.Combine(ReportsPath, reportFileName), FileMode.Create))
{
pdfStream.CopyTo(reportFile);
}
As you can see above I am having FormNumber as parameter for my Report and it is coming by objectDataSource. When I run my project I get an exception and I need help to solve it.
Here is an Exception:
System.InvalidOperationException: The view 'An error occured while evaluating the report parameters. Report source cannot be processed.' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/An error occured while evaluating the report parameters. Report source cannot be processed..aspx
~/Views/Home/An error occured while evaluating the report parameters. Report source cannot be processed..ascx
~/Views/Shared/An error occured while evaluating the report parameters. Report source cannot be processed..aspx
~/Views/Shared/An error occured while evaluating the report parameters. Report source cannot be processed..ascx
~/Views/Home/An error occured while evaluating the report parameters. Report source cannot be processed..cshtml
~/Views/Home/An error occured while evaluating the report parameters. Report source cannot be processed..vbhtml
~/Views/Shared/An error occured while evaluating the report parameters. Report source cannot be processed..cshtml
~/Views/Shared/An error occured while evaluating the report parameters. Report source cannot be processed..vbhtml
SourceControl Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Here is my ReportController Paths:
var appPath = HttpContext.Current.Server.MapPath("~/AQSReport");
var reportsPath = Path.Combine(appPath, "Reports");
Can anyone please help me to solve this exception.?