cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports - SQL Server stored proc datetime parameter format

0 Kudos

I am trying to create a report over Sql Server Stored Proc that expects two datetime input parameters. However the SP does not accept the input parameter value selected on prompt screen, generating error - 'Incorrect syntax near keyword CONVERT'. SQL generated by report is using Convert function by default

EXECUTE[Projects_findings_summary_date]CONVERT(Datetime,'12/01/2017 00:00:00',120),CONVERT(Datetime,'12/31/2017 12:59:59',120) 
GO

This code generated error on Sql Server Management Studio as well. But works fine if we take the CONVERT function out.

EXECUTE[Projects_findings_summary_date]'12/01/2017 00:00:00','12/31/2017 12:59:59'
GO

Any help resolving this issue is appreciated. We have recently upgraded to Crystal 2016 and SQL Server 2014.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Resolved the issue by using SQL OLE DB Native Driver instead of Microsoft OLE DB provider for SQL Server. Convert is not being generated by Crystal report now.

0 Kudos

Does this resolve the TLS 1.2 issue, I have similar issue and if I use the Native Drive it works fine with TLS 1.0, but not TLS 1.2 version.. Need to know if there is any specific driver that supports both TLS1.2 and the DateTime parameter in Stored Procedure without any conversion issue.