Mark Tabor

Mark Tabor

  • 589
  • 2k
  • 460.1k

Crystal Report I have a report and when i am binding this

Apr 25 2018 2:27 PM
I have a crystal report and when i am binding this report to webform i am getting that error message .
 
"CrystalReportViewer - CrystalReportViewer1Report cannot be previewed due to the following error: Bad time format string. Details: errorKind Error in File AverageTiming_IS 6320_13644_{AB6C5F7E-BA91-4FDE-A4BA-77A9B9796444}.rpt: Error in form
ula f_AvgIn: 'CTime ({SP_PP_Get_Agg_rptAverageUserTiming_IS_New.AvgIn})' Bad time format string. Details: errorKind"
 
What would be the cause i am using formula field and in that i am writing
DateDiff ("h", CDate ({SP_PP_Get_Agg_rptAverageUserTiming_IS_New.MondayOut}),
CDate ({SP_PP_Get_Agg_rptAverageUserTiming_IS_New.MondayIn}))
to calculate the difference between two times
 
below is my stored procedure
  1. ALTER PROCEDURE [dbo].[SP_PP_Get_Agg_rptAverageUserTiming_IS_New]  
  2. @EmployeID varchar(50),  
  3. @Sdate AS varchar(250),  
  4. @EDate AS varchar(250),  
  5. @Designation Int,  
  6. @City Int  
  7. AS  
  8. BEGIN  
  9. --Insert into zz_Parameters(iUserID, SDate, EDate)  
  10. --Values (@EmployeID, @Sdate, @Edate)  
  11. --EXEC sp_Employee_Weekly_Report_New_Format '6057', '2016-01-01 09:22:12.000', '2016-01-01 09:22:12.000', 111, 5;  
  12. EXEC sp_Employee_Weekly_Report_New_Format @EmployeID, @Sdate, @EDate, @Designation, @City;  
  13. SELECT dbo.Tbl_Att_Employees.Status,dbo.Tbl_Att_Employees.EmpName AS EmpName, dbo.Tbl_Att_Designations.Designation_Name AS EmpDesig,  
  14. dbo.Tbl_Att_Departments.Department_Name AS EmpDept, dbo.Tbl_Att_City.City_Name AS City, dbo.zz_tbl_Report_New_Format.MondayIn,  
  15. dbo.zz_tbl_Report_New_Format.MondayOut, dbo.zz_tbl_Report_New_Format.TuesdayIn, dbo.zz_tbl_Report_New_Format.TuesdayOut,  
  16. dbo.zz_tbl_Report_New_Format.WednesdayIn, dbo.zz_tbl_Report_New_Format.WednesdayOut, dbo.zz_tbl_Report_New_Format.ThursdayIn,  
  17. dbo.zz_tbl_Report_New_Format.ThursdayOut, dbo.zz_tbl_Report_New_Format.FridayIn, dbo.zz_tbl_Report_New_Format.FridayOut,  
  18. dbo.zz_tbl_Report_New_Format.SaturdayIn, dbo.zz_tbl_Report_New_Format.SaturdayOut, dbo.zz_tbl_Report_New_Format.SundayIn,  
  19. dbo.zz_tbl_Report_New_Format.SundayOut, dbo.zz_tbl_Report_New_Format.AvgIn, dbo.zz_tbl_Report_New_Format.AvgOut,  
  20. dbo.zz_tbl_Report_New_Format.AvgHours, @Sdate as SDate, @EDate as EDate  
  21. FROM dbo.zz_tbl_Report_New_Format INNER JOIN  
  22. dbo.Tbl_Att_Employees ON dbo.zz_tbl_Report_New_Format.StaffID = dbo.Tbl_Att_Employees.EmpID INNER JOIN  
  23. dbo.Tbl_Att_Departments ON dbo.Tbl_Att_Employees.Department = dbo.Tbl_Att_Departments.Department_ID INNER JOIN  
  24. dbo.Tbl_Att_Designations ON dbo.Tbl_Att_Employees.Designation = dbo.Tbl_Att_Designations.Designation_ID INNER JOIN  
  25. dbo.Tbl_Att_City ON dbo.Tbl_Att_Employees.City = dbo.Tbl_Att_City.City_ID  
  26. Where dbo.Tbl_Att_Employees.Status =1  
  27. END  

Answers (1)