Plz help me this issue. I have a query report in tab report :
SELECT Count(std.STATUSNAME) AS "Tổng yêu cầu hỗ trợ", sum(Case std.STATUSNAME when 'resolved' then 1 when 'Closed' then 1 else 0 end) AS "Số yêu cầu đã hoàn thành",
ROUND((sum(Case std.STATUSNAME when 'resolved' then 1 when 'Closed' then 1 else 0 end)*100/Count(std.STATUSNAME)),0) AS "Tỷ lệ hoàn thành",(Count(std.STATUSNAME)-sum(Case std.STATUSNAME when 'resolved' then 1 when 'Closed' then 1 else 0 end)) as " Số yêu cầu đang thực hiện",Round(((Count(std.STATUSNAME)-sum(Case std.STATUSNAME when 'resolved' then 1 when 'Closed' then 1 else 0 end))
*100/Count(std.STATUSNAME)),0) as " Tỷ lệ đang thực hiện" FROM "WorkOrder" "wo" LEFT JOIN "WorkOrderStates" "wos" ON "wo"."WORKORDERID"="wos"."WORKORDERID" LEFT JOIN "StatusDefinition" "std" ON "wos"."STATUSID"="std"."STATUSID" WHERE ( ( ( "wo"."CREATEDTIME" >= datetolong('2021-01-05 12:00:00') ) AND ( ( "wo"."CREATEDTIME" != 0 ) AND ( "wo"."CREATEDTIME" IS NOT NULL ) ) ) AND ( ( "wo"."CREATEDTIME" <= datetolong('2021-01-29')) AND ( ( ( "wo"."CREATEDTIME" != 0 ) AND ( "wo"."CREATEDTIME" IS NOT NULL ) ) AND ( "wo"."CREATEDTIME" != -1 ) ) ) ) AND wo.ISPARENT='1'