クエリ:
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の結果で結果が得られない理由を教えてください。(レポートの [カテゴリ] 列に [完了] と [未回答] と表示されますが、まったく表示されません)