SQL Server数据源日期不能用#,改了可以了
max = e.DataTable.SQLCompute("Max(入库明细单号)", "入库日期 >= '" & fd & "' And 入库日期 <= '" & ld & "' And [_Identify] <> " & e.DataRow("_Identify")) '取得该月的最大编号