Hi,
I'm trying to implement the Trend class. Within the datasource function I'm executing rawSQL. It appears the SQLHandler is adding a DATE_FORMAT function in the case of MSSQL integration and this is resulting in a function not found error being returned.
Full call stack, if it helps.
Message: Query Error >> [[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]'DATE_FORMAT' is not a recognized built-in function name.] >> SELECT DATE_FORMAT(oh_datetime,'%Y-%m-%d') AS oh_datetime_day, SUM(total) AS total_sum FROM ( select cast(oh_datetime as datetime) as 'oh_datetime', oh_cust_order_ref, sum(oli_gross) as 'total', ec_description from order_header left join order_line_item ON (oh_id = oli_oh_id) left join ecommerce_session ON (oh_ec_id = ec_id) where oh_os_id IN (1,2,3,4,5,6) and ec_description IS NOT NULL group by cast(oh_datetime as date), oh_cust_order_ref, ec_description order by cast(oh_datetime as date), ec_description ) as t WHERE (oh_datetime >= '2021-11-01 00:00:00' AND oh_datetime <= '2021-11-30 23:59:59') GROUP BY oh_datetime_day Line: 433 File: /var/www/html/waylandbi/vendor/koolreport/core/src/datasources/PdoDataSource.php Collapse #0: /var/www/html/waylandbi/vendor/koolreport/core/src/core/DataSource.php Line 108 : start(null) #1: /var/www/html/waylandbi/vendor/koolreport/core/src/core/Node.php Line 365 : requestDataSending(null) #2: /var/www/html/waylandbi/vendor/koolreport/dashboard/sources/PDOSource.php Line 106 : requestDataSending(null) #3: /var/www/html/waylandbi/vendor/koolreport/dashboard/data/SQLHandler.php Line 140 : run(null) #4: /var/www/html/waylandbi/vendor/koolreport/dashboard/metrics/Trend.php Line 133 : executes(null) #5: /var/www/html/waylandbi/vendor/koolreport/dashboard/Widget.php Line 205 : render(null) #6: /var/www/html/waylandbi/vendor/koolreport/dashboard/theme/TRenderItem.php Line 16 : view(null) #7: /var/www/html/waylandbi/vendor/koolreport/dashboard/amazing/containers/Row.view.php Line 11 : renderItem(null) #8: /var/www/html/waylandbi/vendor/koolreport/core/src/KoolReport.php Line 502 : include(["/var/www/html/waylandbi/vendor/koolreport/dashboard/amazing/containers/Row.view.php"]) #9: /var/www/html/waylandbi/vendor/koolreport/dashboard/theme/TRender.php Line 10 : render(null) #10: /var/www/html/waylandbi/vendor/koolreport/dashboard/containers/Row.php Line 47 : render(null) #11: /var/www/html/waylandbi/vendor/koolreport/dashboard/containers/Container.php Line 114 : render(null) #12: /var/www/html/waylandbi/vendor/koolreport/dashboard/theme/TRenderItem.php Line 18 : view(null) #13: /var/www/html/waylandbi/vendor/koolreport/dashboard/amazing/Dashboard.view.php Line 10 : renderItem(null) #14: /var/www/html/waylandbi/vendor/koolreport/core/src/KoolReport.php Line 502 : include(["/var/www/html/waylandbi/vendor/koolreport/dashboard/amazing/Dashboard.view.php"]) #15: /var/www/html/waylandbi/vendor/koolreport/dashboard/theme/TRender.php Line 12 : render(null) #16: /var/www/html/waylandbi/vendor/koolreport/dashboard/Dashboard.php Line 320 : render(null) #17: /var/www/html/waylandbi/vendor/koolreport/dashboard/Dashboard.php Line 291 : render(null) #18: /var/www/html/waylandbi/vendor/koolreport/dashboard/Dashboard.php Line 271 : view(null) #19: /var/www/html/waylandbi/vendor/koolreport/dashboard/TAction.php Line 35 : actionIndex(null) #20: /var/www/html/waylandbi/vendor/koolreport/dashboard/Dashboard.php Line 230 : action(null) #21: /var/www/html/waylandbi/vendor/koolreport/dashboard/pages/Main.php Line 137 : handle(null) #22: /var/www/html/waylandbi/vendor/koolreport/dashboard/Application.php Line 216 : handle(null) #23: /var/www/html/waylandbi/vendor/koolreport/dashboard/Application.php Line 148 : handle(null) #24: /var/www/html/waylandbi/index.php Line 11 : run(null)