I have created a parameter for my report named CutOffDate which has been set to a date field.
I set a record selection criteria to be the tables date fields equal to the parameter.
My data is in DB2.
When I run the report I get no records.
When I look at the sql statement used by Crystal reports (v8.5) This is what I see:
SELECT
DR_STMT_REPORT."STATEMENT_ID", DR_STMT_REPORT."STATEMENT_DATE", DR_STMT_REPORT."VENDOR_ID",
VENDOR."VENDOR_ID", VENDOR."NAME", VENDOR."ADDRESS_1", VENDOR."ADDRESS_2", VENDOR."CITY", VENDOR."PROVINCE", VENDOR."POSTAL_CODE",
DRIVER."DRIVER_ID", DRIVER."NAME", DRIVER."ADDRESS_1", DRIVER."ADDRESS_2", DRIVER."CITY", DRIVER."PROVINCE", DRIVER."POSTAL_CODE", DRIVER."PHONE",
{fn USER()}
FROM
"DR_STMT_REPORT" DR_STMT_REPORT INNER JOIN "VENDOR" VENDOR ON
DR_STMT_REPORT."VENDOR_ID" = VENDOR."VENDOR_ID" INNER JOIN "DRIVER" DRIVER ON
VENDOR."VENDOR_ID" = DRIVER."DRIVER_EMPLOYMENT"
WHERE
VENDOR."VENDOR_ID" = 'THOMD' AND
DR_STMT_REPORT."STATEMENT_DATE" >= {ts '2005-08-28 00:00:00.00'} AND
DR_STMT_REPORT."STATEMENT_DATE" <= {ts '2005-08-28 23:59:59.00'}
ORDER BY
DR_STMT_REPORT."VENDOR_ID" ASC,
DRIVER."DRIVER_ID" ASC
If I execute the query after removing the date field from the where clause I get 4 records. 2 on 8/27/2005 and 2 on 8/28/2005. The fields are date time and the time on all 4 records is 23:59:59.
What am I doing wrong?
What do I need to do to fix it?
I set a record selection criteria to be the tables date fields equal to the parameter.
My data is in DB2.
When I run the report I get no records.
When I look at the sql statement used by Crystal reports (v8.5) This is what I see:
SELECT
DR_STMT_REPORT."STATEMENT_ID", DR_STMT_REPORT."STATEMENT_DATE", DR_STMT_REPORT."VENDOR_ID",
VENDOR."VENDOR_ID", VENDOR."NAME", VENDOR."ADDRESS_1", VENDOR."ADDRESS_2", VENDOR."CITY", VENDOR."PROVINCE", VENDOR."POSTAL_CODE",
DRIVER."DRIVER_ID", DRIVER."NAME", DRIVER."ADDRESS_1", DRIVER."ADDRESS_2", DRIVER."CITY", DRIVER."PROVINCE", DRIVER."POSTAL_CODE", DRIVER."PHONE",
{fn USER()}
FROM
"DR_STMT_REPORT" DR_STMT_REPORT INNER JOIN "VENDOR" VENDOR ON
DR_STMT_REPORT."VENDOR_ID" = VENDOR."VENDOR_ID" INNER JOIN "DRIVER" DRIVER ON
VENDOR."VENDOR_ID" = DRIVER."DRIVER_EMPLOYMENT"
WHERE
VENDOR."VENDOR_ID" = 'THOMD' AND
DR_STMT_REPORT."STATEMENT_DATE" >= {ts '2005-08-28 00:00:00.00'} AND
DR_STMT_REPORT."STATEMENT_DATE" <= {ts '2005-08-28 23:59:59.00'}
ORDER BY
DR_STMT_REPORT."VENDOR_ID" ASC,
DRIVER."DRIVER_ID" ASC
If I execute the query after removing the date field from the where clause I get 4 records. 2 on 8/27/2005 and 2 on 8/28/2005. The fields are date time and the time on all 4 records is 23:59:59.
What am I doing wrong?
What do I need to do to fix it?