Sai Ram

Sai Ram

  • NA
  • 237
  • 113.3k

Crystal Reports

Nov 3 2011 8:42 AM
Hi. I am using Report path in the .cs file as follows...but after exporting report, my current directory changes to exporting report and after this, generating a report an "Report Load Failed" Message coming...what should i do..

string cwd = System.IO.Directory.GetCurrentDirectory();             
if (cwd.EndsWith("\\bin\\Debug"))
{
                    cwd = cwd.Replace("\\bin\\Debug", "\\AuditReports\\Audit.rpt");
}
else
{
                  cwd += "\\AuditReports\\Audit.rpt";
 }
ReportDocument reportDocument = new ReportDocument();
reportDocument.Load(cwd);



Answers (4)