Dim StartDate As Date = Date.Today().AddDays( - 365)
e.Table.Cols("申请单位").ComboList = DataTables("任务单").GetComboListString("申请单位", "[承接日期] > #" & StartDate & "#")
把表达式改为最后新增的100行,怎么改?
要使用sql
Dim cmd As New SQLCommand
cmd.ConnectionName = "数据源名称"
Dim dt As DataTable
Dim StartDate As Date = Date.Today().AddDays( - 365)
cmd.CommandText = "SELECT DISTINCT top 100 申请单位 From {任务单} where [承接日期] > #" & StartDate & "#"
dt = cmd.ExecuteReader()
e.Table.Cols("申请单位").ComboList .ComboList= dt.GetComboListString("申请单位")