//added name spaces string pdfPath; string pdfpath = Server.MapPath("\\KSADSRWeb\\Reports\\"); pdfPath = pdfpath + "OverAll" + ".pdf"; DataTable TargetReport = new DataTable(); string date = txtCalander.Text.ToString(); string appPath = HttpContext.Current.Request.ApplicationPath; ReportDocument crystalReport = new ReportDocument(); //throwing below error. crystalReport.Load(Server.MapPath("/DemoKSADSRweb/TargetReport.rpt")); TargetReport = GetTarget("usp_Targetvsachivement_Modified", date); crystalReport.SetDataSource(TargetReport); CrystalReportViewerTraget.ReportSource = crystalReport;
System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.IO.FileNotFoundException: Retrieving the COM class factory for component with CLSID {5FF57840-5172-4482-9CA3-541C7878AE0F} failed due to the following error: 8007007e The specified module could not be found. (Exception from HRESULT: 0x8007007E). at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() --- End of inner exception stack trace --- at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() at Reports.BtnSubmit_Click(Object sender, EventArgs e)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)