str = "{table1.time}='" & DTPicker1.Value & "'"
and {table1.time}<'" & DTPicker2.Value & "'" 此句有错,应该是
str = "{table1.time}>'" & DTPicker1.Value & "'
and {table1.time}<'" & DTPicker2.Value & "'"
and {table1.time}<'" & DTPicker2.Value & "'" 此句有错,应该是
str = "{table1.time}>'" & DTPicker1.Value & "'
and {table1.time}<'" & DTPicker2.Value & "'"
但程序还是不执行报表数据项显示为空
str = "datediff(day,{table1.time},'" & DTPicker1.Value & "')=0"
and datediff(day,{table1.time},'" & DTPicker2.Value & "')>0"
CrystalReport1.ReportFileName = "d:\table1.rpt"
CrystalReport1.SelectionFormula = str
CrystalReport1.Action = 1
即使同为DATATIME类型也会因为显示格式不同而无法查询到数据。
运行程序后报错 error in formula <record_selection>
str = "datediff(day,{table1.time},'2003-12-1')<0
and datediff(day,{table1.time},'2003-12-4'>0"
the remaining text does not appear to be part of the formula tiger201(你是风儿我是沙,编程不如种地瓜。) :即使同为DATATIME类型也会因为显示格式不同而无法查询到数据。如果出现你说的这种情况该如何解决
我用的是这个
"'" & Year(DTPicker1.Value) & " /" & Month(DTPicker1.Value) & " / " & Day(DTPicker1.Value) & "'"谢谢大家