科讯现在的sql标签中如果调用{$AutoID}而且又做了分页的话,那么在第二页开始就又从1开始循环,解决方法如下:
打开KS_Cls\Kesion.Label.SQLCls.asp文件,大约323行附近,把代码做如下修改
注:蓝色为增加和修改部分
-
'替换循环部分内容 Function GetCirLabelContent(CirLabelContent,ByRef KS_RS_Obj,LoopTimes) Dim regEx, Matches, Match, TempStr Dim FieldParam,FieldParamArr,FieldName,FieldType,ReturnFieldValue Dim DB_FieldValue,I,N Dim M Dim CurrPage:CurrPage=KS.ChkClng(KS.G("Page")) If Not IsNumeric(LoopTimes) Then LoopTimes=10 If LoopTimes=0 Then LoopTimes=KS_RS_Obj.RecordCount '增加分页后autoid递增 by 无风 201-8-8 IF CurrPage=0 then CurrPage=1 M=1 Else M=(CurrPage-1)*LoopTimes+1 End If '增加分页后autoid递增 by 无风 201-8-8
For N=M To LoopTimes*((CurrPage-1)+1) If Not KS_RS_Obj.Eof Then Set regEx = New RegExp regEx.Pattern = "{\$Field\([^{\$}]*}" regEx.IgnoreCase = True regEx.Global = True Set Matches = regEx.Execute(CirLabelContent) TempStr=Replace(CirLabelContent,"{$AutoID}",N)
效果图
修改好的文件下载
以下内容只有回复后才可以浏览,请先登录!