I have date wise record in table now i want to display no of record from table date wise.
I implemented as below to display no of count on crystal report.
But issue is when no record on particular date that date is skipped.
I want to display zero on that date.
SELECT S_ISSUEDATE ,COUNT(*) as 'Record' FROM STUDENT_MASTER_NEW
WHERE CONVERT(DATETIME,S_ISSUEDATE,103) BETWEEN CONVERT(DATETIME,@FromDate,103) AND CONVERT(DATETIME,@ToDate,103)
group by S_ISSUEDATE
order by CONVERT(DATETIME,S_ISSUEDATE ,103)
Above query result is as below. Suppose we select date range 01/08/2022 to 07/08/2022 and 3, 4 date has no record so that record is skipped.
Date Record
01/08/2022 10
02/08/2022 15
05/08/2022 14
06/08/2022 12
07/08/2022 11
I want to display record if the 3 and 4 dates have no record then it will display as below.
Date Record
01/08/2022 10
02/08/2022 10
03/08/2022 0
04/08/2022 0
05/08/2022 14
06/08/2022 12
07/08/2022 11