I am a new user of crystal reports 2008 and I have it connected to an oracle 10g database.
I have a table that gets updated every minute, and I need to create a report to run at 5th of every month of the year. My problem is that I cannot put the time period of my query as variable, one way would be to create 12 reports each one for one month and put the date and time of corresponding month, but it should be a better way of doing it by only having one query.
I will be grateful if somebody can help me on this.
SELECT TO_CHAR(STARTING_OF_CH_DATE,'DD-MM-RRRR') DAY,
COUNT(1) CALLS,
ROUND(SUM(CALL_DURATION/60),3) MINUTES
FROM Table_Name
WHERE STARTING_OF_CH_DATE BETWEEN TO_DATE('01052009|| ' 000000','DDMMRRRR HH24MISS')
AND TO_DATE('20052009||' 235959','DDMMRRRR HH24MISS')
GROUP BY TO_CHAR(STARTING_OF_CH_DATE,'DD-MM-RRRR')
ORDER BY TO_CHAR(STARTING_OF_CH_DATE,'DD-MM-RRRR')
Regards