1. 程式人生 > >解決SMARTFORMS 中table 控制元件單行跨頁的問題

解決SMARTFORMS 中table 控制元件單行跨頁的問題

        在CX專案中,MM模組做了大量的的單據列印的工作,一個問題困擾了我好久,一直不能解決。當物料描述很長時,table控制元件在單元格中能自動換行,這樣就有可能在換頁處出現一行記錄的一部分打在上一頁,一部分記錄打在下一頁,出現了單行跨頁列印的問題,一直不能找到很好的解決方法,曾一度考慮把table 換成template。

很偶然,有次在表的行類性裡看到有個“無換頁”的選項,按F1檢視它的幫助資訊如下:


Page protection attribute
Switch for page protection.
Use
Page protection switch.
In some cases you may want to avoid that text is divided by a page break. Therefore, you can protect text sections 
with a page protection.
Page protection can extend to
a paragraph
a text node
all output within a folder, for example, several text nodes combined in this folder.
a line type (table node)
If on the current page there is not enough space left for the protected text, it is displayed entirely on the next page.

        呵呵,一目瞭然,這個選項正是解決困擾我好久問題的解決方案,在明細的行類性的“無換頁”處打上對勾,就完美解決了這個問題了,希望給受此困擾的兄弟們有點幫助。