i have an asp.net application with crystal reports, i am facing problem when i load report on form this error is getting only for me, when i run my application on my colleague system it is working properly.
my page_load code is
protected void Page_Load(object sender, EventArgs e)
{
string strReportPath = "../Report/crt_test.rpt";
if (!File.Exists(Server.MapPath(strReportPath)))
{
Response.Write("Unable to Locate");
}
else
{
ReportDocument cr;
cr = new ReportDocument();
cr.Load(Server.MapPath(strReportPath));
cr.SetDataSource(dsrpt);
crv1.ReportSource = cr;
}
}
I am getting this error
Failed to open report.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Failed to open report.
Line 24: ReportDocument cr;
Line 25: cr = new ReportDocument();
Line 26: cr.Load(Server.MapPath(strReportPath));
Line 27: //cr.SetDataSource(dsrpt);
Line 28: crv1.ReportSource = cr;
error in line no. 26
please help me...
thanks in advance