Date column is showing up empty on the report even though it is able to show results when I run it on SQL Command in Apex
This is the code:
select project_name, Dates, sum(records_number) as
from (
select project_name,
case
when :P22_DATE_RANGE = 'Daily' then
to_char(date_sys, 'DD-Mon-YYYY')
when :P22_DATE_RANGE = 'Weekly' then
to_char(TRUNC(date_sys, 'IW'), 'DD-Mon-YYYY')
end as Dates,
RECORDS_NUMBER
from BATCH
WHERE date_sys BETWEEN TO_DATE(:P22_START_DATE) AND TO_DATE(:P22_END_DATE)
) my_records
group by project_name, Dates
;