if onlastrecord then
false
else
if RecordNumber mod 5=0 then
true
else
false
水晶報表分頁並自動插入空白行
在論壇上經常會看到水晶報表分頁的問題,這個很好解決。
但是自動插入空白行的問題卻一直沒有很好的答案,
經過研究找到一個變通的辦法來實現了.
在詳細資料上點格式化節,在後面頁新建頁打勾
公式中輸入:
if onlastrecord then
formula = false
else
if RecordNumber mod 5 =0 then
formula =true
else
formula =false
end if
end if
'(BASIC 語法)
---------------------------------------------------------------------
最後頁不足,用空行填充:
新增一個空白詳細資料行,格式化此節,在抑制顯示(無深化)打勾
公式中輸入:
if not onlastrecord then
FORMULA = TRUE
else
if (RecordNumber mod 5 <= 1) then '第一個
FORMULA = TRUE
else
FORMULA = FALSE
end if
end if
'(BASIC 語法)
...接着第二個:
公式中輸入:
if not onlastrecord then
FORMULA = TRUE
else
if (RecordNumber mod 5 <= 2) then '第二個
FORMULA = TRUE
else
FORMULA = FALSE
end if
end if
...
(注:此方法適用於行數較少,不過不覺得麻煩,對行數較多也可以用)