且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

s-s-rs中的报告出错

更新时间:2022-12-17 22:22:00

发布解决方案,因为OP确认了我工作。



使用明确的日期格式,以便SQL不会尝试转换字符串。即
Posting as solution as OP has confirmed it worked.

Use an unambiguous date format so that SQL does not try to convert the string. i.e.
WHERE TransDate = '22-NOV-2015'



为了回应进一步的评论,您可以获得所有日期的详细信息:


In response to the further comments, you can get the details for all of the dates thus:

SELECT CardType, TransDate, Sum(Amount) AS Total
FROM POSTRANS_Cards
GROUP BY CardType, TransDate
ORDER BY TransDate



或者,如果您想在单个日期运行报告,请查看以下教程的第1课

将参数添加到报告 [ ^ ]