我想从2016年01月至2月31日至2016年3月31日提交报告。使用公式
{cryRpt.RecordSelectionFormula = "{product_details.date11} >= #" &
DateTimePicker1.Text & "# and {product_details.date11} <= #" &
DateTimePicker2.Text & "#"}
但是它仍然没有提供适当的序列,有时在01-2016年3月-2016年之间,与29-2016年2月29日-2016年一样,在水晶报告中使用组,但仍然没有成功,帮助我走出困境。
发布于 2016-03-27 10:47:23
在这些#
晶体之间,将日期作为日期时间,而不是日期值,以获得需要转换为日期的正确值,尝试如下所示:
{cryRpt.RecordSelectionFormula = "{product_details.date11} >=CDate( #" &
DateTimePicker1.Text & "#) and {product_details.date11} <= CDate(#" &
DateTimePicker2.Text & "#"})
我还没有检查语法,请检查在记录选择公式中使用的时间
https://stackoverflow.com/questions/36242815
复制相似问题