I am using crystal reports 11. I am using the database expert to create a virtual table using an SQL command. I am trying to pass a date as a parameter to the command, but it is always evaluated as today's date. If I print the parameter in the report header, it is correct, but if I select it from the database it is incorrect.
select ( select to_char ( {?Pm-@ReportMonthDate}, 'DD/MM/YYYY' ) from dual ) xxx,
( select nvl(value_nbr,0)
from arg_mnl_data_rcrd mdr,
arg_mnl_data_elmnt mde
where mdr.rlvnt_dt = {?Pm-@ReportMonthDate}
and mdr.data_elmnt_id = mde.data_elmnt_id
and mde.cr_key = 'DUTY_DAYS_AIRCRAFT' ) DUTY_DAYS_AIRCRAFT
FROM DUAL;
Werner
select ( select to_char ( {?Pm-@ReportMonthDate}, 'DD/MM/YYYY' ) from dual ) xxx,
( select nvl(value_nbr,0)
from arg_mnl_data_rcrd mdr,
arg_mnl_data_elmnt mde
where mdr.rlvnt_dt = {?Pm-@ReportMonthDate}
and mdr.data_elmnt_id = mde.data_elmnt_id
and mde.cr_key = 'DUTY_DAYS_AIRCRAFT' ) DUTY_DAYS_AIRCRAFT
FROM DUAL;
Werner