我自己写公式解决了
if isnull({personalHouseMX.js}) then '{personalHouseMX.js}为总记录数
formula = false
else
dim j as number
if {personalHouseMX.js}=15 then
j=14
else
if ({personalHouseMX.js}-15) mod 18=0 then
j={personalHouseMX.js}-1
end if
end if
if recordnumber<>{personalHouseMX.js} and recordnumber=15 then
formula = true
else
if recordnumber<>{personalHouseMX.js} and (recordnumber-15) mod 18=0 then
formula = true
else
if recordnumber=j then
formula = true
else
formula = false
end if
end if
end if
end if