dualshck012
Active member
Good Day!
Need help on SQL query for my rdlc reporting file in visual studio. I have a BAR chart which displays the total patient collections but my chart displays all the data in specific dates and not according to group dates or any relevant term to say. The screenshot below tells the problem at dates 2/25/2018 which should’ve been merged in one bar for the total patient in that date.
see attached image

Here is the script from the query builder in Visual Studio 2015:
SELECT COUNT(*) AS total_exam, labcollect AS collected
FROM labinpat
WHERE (labcollect BETWEEN ? AND ?)
GROUP BY labcollect
I think I’m missing a query after GROUP BY labcollect . I tried GROUP BY CONVERT(labcollect) / CAST(labcollect AS DATE) but return as error.
IDE: VS2015
Database: MySQL through ODBC
Need help on SQL query for my rdlc reporting file in visual studio. I have a BAR chart which displays the total patient collections but my chart displays all the data in specific dates and not according to group dates or any relevant term to say. The screenshot below tells the problem at dates 2/25/2018 which should’ve been merged in one bar for the total patient in that date.
see attached image

Here is the script from the query builder in Visual Studio 2015:
SELECT COUNT(*) AS total_exam, labcollect AS collected
FROM labinpat
WHERE (labcollect BETWEEN ? AND ?)
GROUP BY labcollect
I think I’m missing a query after GROUP BY labcollect . I tried GROUP BY CONVERT(labcollect) / CAST(labcollect AS DATE) but return as error.
IDE: VS2015
Database: MySQL through ODBC