mohaammed talha

mohaammed talha

  • 1.6k
  • 341
  • 8.2k

Failed to load database information in crystal reprot c#

Jul 30 2021 6:15 AM

Error in File CrystalReport1 19460_12996_{1FAC5040-8D16-4E07-90ED-903C4DB8EA5D}.rpt:
Failed to load database information.

protected void Report()
    DataTable dt = new DataTable();
    string query = @"select a.CompanyCode,c.CompanyName,a.EmployeeCode,b.EmployeeName,a.ProcessDate,a.Shift,a.CheckIn,a.CheckOut,a.HoursWorked,a.ExtraHours from paySwipeLOG a left join payEmployeeMaster b on a.EmployeeCode=b.EmployeeCode left join admCompanyNew c on a.CompanyCode=c.CompanyCode left join payAttribute d on b.DepartmentCode=d.AttributeCode and d.AttributeID='2' where a.EmployeeCode='bs866'";
    SqlDataAdapter objAdapter = new SqlDataAdapter(query, strConn);

    if (dt.Rows.Count > 0)
        string reportPath = "~/CrystalReport1.rpt";
        ReportDocument rd = new ReportDocument();
        rd.SetDatabaseLogon("Eureka", "", "",
        CrystalReportViewer1.ReportSource = rd;


Answers (1)