如何在 Crystal 报告中获得此输出?

How can I get this output in Crystal Reports?

我已经使用 SQL 大约 2 年了,但我最近开始使用 Crystal Reports 2013。

我需要将下面的 SQL 转换为 Crystal 报告:

SELECT     COUNT(orders.order_no), reason_codes.reason_desc
FROM       orders, reason_codes
WHERE      orders.reason_code = reason_codes.reason_code
AND        orders_reason.code IS NOT NULL
GROUP BY   reason_codes.reason_desc

我不知道如何完成计数。我正在寻找看起来像这样的最终结果:

COUNT(orders.order_no), reason_codes.reason_desc
500                     Broken in Transit
400                     Broken in Warehouse

直接在SQL里做似乎很容易,就像我上面做的那样,但是在Crystal报表里得到想要的输出似乎很复杂,我不知道从哪里开始!

在创建数据库连接时使用命令并完全使用相同的查询,现在在设计中将您的字段放在详细信息中。