Shehzad K. answered 02/17/23
Unlocking Potential: Unleashing the Genius Within You
The error you are seeing might be related to the session state of your ASP.NET application. In SharePoint 2007, session state is disabled by default for security reasons, so if your application relies on session state, you may need to enable it explicitly.
<sessionState mode="InProc" /> in XML File
This will enable in-process session state, which stores session data in memory on the web server
or change it like this otherwise use debugging mode where problem comes
if (!Page.IsPostBack)
{ string reportPath = Session["ReportPath"] as string;
if (reportPath == null) {
reportPath = @"C:\New folder\RDLC\RiskReports\RiskReports\Report1.rdlc";
Session["ReportPath"] = reportPath;
}
rptViewer.Reset(); rptViewer.LocalReport.EnableHyperlinks = true;
rptViewer.KeepSessionAlive = true; rptViewer.ProcessingMode = ProcessingMode.Local; rptViewer.LocalReport.ReportPath = reportPath;
}