Case "result.html"
Dim flt As String
If e.PostValues.ContainsKey("Name") Then
flt = "姓名 = '" & e.PostValues("Name") & "'"
End If
If e.PostValues.ContainsKey("StartDate") Then
If flt > "" Then
flt = flt & " and "
End If
flt = flt & "日期 >= '" & e.PostValues("StartDate") & "'"
End If
If e.PostValues.ContainsKey("EndDate") Then
If flt > "" Then
flt = flt & " and "
End If
flt = flt & "日期 <= '" & e.PostValues("EndDate") & "'"
End If
msgbox("name:" & e.PostValues("Name"))
msgbox("CommandText :" & flt)
cmd.CommandText = "selec t [日期],[姓名],[设备编号ID] As 设备编号,[工序],[工位],[物料名称],[规格],[数量],[单位],[工时] fro m {日报表}"
If flt <> "" Then
cmd.CommandText = cmd.CommandText & "wher e" & flt
End If
With wb.AddTable("","Table1")
.CreateFromDataTable(cmd.ExecuteReader)
End With
With wb.AddButtonGroup("","btg1",True)
.Add("btn1","重新筛选","","filter.html")
End With
End Select
e.WriteString(wb.Build)