0

查询

select acc.cust_no, surrogateTable.category as categoryCall, count(acc.calling_no) as totalCalls
from (select 'Completed' as category union all select 'Unanswered' as category) as surrogateTable
left join acc on surrogateTable.category = 'Completed' 
where acc.method = 'INVITE' AND acc.sip_code = '200' and 
(acc.cust_no = 'BIS00031' or acc.cust_no = 'BIS00031') 
UNION 
select missed_call.cust_no, surrogateTable.category as categoryCall, count(missed_call.calling_no) as totalCalls 
from (select 'Completed' as category union all select 'Unanswered' as category) as surrogateTable 
left join missed_call on surrogateTable.category = 'Unanswered' 
where missed_call.method = 'INVITE' AND missed_call.sip_code = '487' and 
(missed_call.cust_no = 'BIS00031' or missed_call.cust_no = 'BIS00031') 
order by categoryCall ASC

查询结果

在此处输入图像描述

报告设计

在此处输入图像描述

报告结果

在此处输入图像描述

谁能告诉我为什么我没有categoryCall在 Crystal Report 结果中得到结果?(应该在报告的“类别”栏中显示“已完成”和“未答复”,根本不显示)

4

0 回答 0