I collected the difference below from internet, just FYI.
template is a static and table is dynamic maximum, we prefer table only.
Template node: templates are static because the no of column and lines are determind before the actual output.
Table node:tables are dynamic because the table size depend on the amount of tha data selected at run time.
Templates: Templates are used in layouts when the number of rows are known and fixed.
Tables: Tables are used to print dynamic data, where the number of rows cannot be determined in advance
如果你只用简单的、重复的多行的话,用Table反而实现起来更容易。但如果设想,你一个表格里面,第一、二、三行的Cell数不一样,你用Table还能实现吗?个人认为,除了的确是非常简单的,以后也不准备扩展的单一格式表格打印的话,用Table,否则就全部考虑用Template,template稍微复杂一点点,但以后扩展起来更方便。
table你只要设计一个行格式的高度和整个table的高度,它就会自动打印了,并且超过宽度会自动换行.而templte是不会自动换行的,超出的部分不显示.
这两个功能都是用来输出固定格式的信息, 如有固定行和列的尺寸, 当然你也可以用简单的WINDOW去一个一个的输出, 类似SCRIPT FORM.
区别就是如SAP所说的, TABLE的行数是可以动态变的, TEMPLATE不可以, 它所输出是固定的行和列
比如你要输入一张销售订单的ITEM的名称,数量, 价格, 必须用TABLE, 因为每个销售订单的ITEM个数是不固定的.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/547380/viewspace-1710865/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/547380/viewspace-1710865/