Skip to Content
0

How to fix error saying "A string is required here"

Feb 15, 2017 at 06:24 PM

50

avatar image

I have a column in tblRegPatient name Date and its DataType is "Date".

and I am trying to filter the data in crystal report by Date, while writting the formula of

"If {tblRegPatient.Date} >= {?start_date} and {tblRegPatient.Date} <={?end_date} then true"

there is error saying "A string is required here".
The type of start_date and end_date is Date but when I Browse Data of column Date in Field Explorer it is "String" but its datatype is "Date" in my tblRegPatient.. It is strange.. Please help me. Thanks!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Brian Dong Feb 15, 2017 at 10:31 PM
0

Hi,

If Crystal is seeing your Date field as a string, that usually means the driver you are using it probably the wrong version. What database are you connecting to and what database driver are you using?

Normally I'd recommend having your formula convert the field to a date but that won't address the actual problem. Have a look at the driver and make sure you are using the correct version.

Good luck,

Brian

Share
10 |10000 characters needed characters left characters exceeded
Taseeb Saeed Feb 19, 2017 at 08:23 AM
0

Hello,

Try this

If cdate({tblRegPatient.Date}) >= {?start_date} and cdate({tblRegPatient.Date}) <={?end_date} then true

Thanks,

Engr. Taseeb Saeed

Share
10 |10000 characters needed characters left characters exceeded