Skip to Content
avatar image
Former Member

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

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 15, 2017 at 10:31 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 19, 2017 at 08:23 AM

    Hello,

    Try this

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

    Thanks,

    Engr. Taseeb Saeed

    Add comment
    10|10000 characters needed characters exceeded