设计锐浪表格的模板时,可以通过设计多个表头、表尾,表头、表尾中放入打印控件,可以打印相关的数据。在真实打印时,可以通过打印时让表头、表尾隐藏或显示,实现用户的表格样式。
一、表头的指定
1、 表头可以多个,引用K= 0-(n-1) 如 : GridppReport1.ReportHeaders.Item[K].
2、通过表头表尾名称,可以获取K值:
k:=GridppReport1.ReportHeaders.IndexByName('ReportHeader1');
3、指定显示或隐藏
if sCheckBox1.Checked
then GridppReport3.ReportHeaders.Item[K].Visible:=True
else GridppReport3.ReportHeaders.Item[K].Visible:=False;
同理
二、表尾的指定
1、 表头可以多个,引用K= 0-(n-1) 如 : GridppReport1.ReportHeaders.Item[K].
2、通过表头表尾名称,可以获取K值:
k:=GridppReport1.ReportHeaders.IndexByName('ReportHeader1');
3、指定显示或隐藏
if sCheckBox1.Checked
then GridppReport3.ReportHeaders.Item[K].Visible:=True
else GridppReport3.ReportHeaders.Item[K].Visible:=False;