如何在水晶报表中添加日期过滤器?

时间:2019-05-13 05:29:30

标签: sql crystal-reports sql-server-2014-express qsqlquery

我需要在以下查询中添加od.DocDate以过滤我的水晶报表中的数据。

SELECT
sp.SlpCode,
sp.SlpName,
sp.Telephone,
od.DocDate,
COUNT(od.DocEntry) count,
COUNT(CASE WHEN od.U_ArtWork = 'NotRec' THEN 1 END) AS Artwork,
COUNT(CASE WHEN od.U_DetailPending = 'No' THEN 1 END) AS DetailPrinting
FROM OSLP sp
LEFT JOIN ORDR od
    ON SP.SlpCode = od.SlpCode
GROUP BY
    sp.SlpCode,
    sp.SlpName,
    od.DocDate,
    sp.Telephone
ORDER BY
    sp.SlpName;

它生成这样的值 enter image description here

但是我需要显示这样的值 enter image description here

0 个答案:

没有答案