谢谢您的反馈。
为了达到这种效果,需要编码来设计。
基本思路是,先决定页面的个数。
1.在Report.OnOpen的脚本添加如下代码:
2.在Report.OnPage的脚本添加如下代码:
- if CurPageNo = Report.Tag then
- Report.Layout.PictureShow = 0
- endif
- CurPageNo = CurPageNo + 1
复制代码
3。生成报表:
- ' load repor template
- Dim rep As C1Report = New C1Report()
- rep.Load("....report.xml", "01: Alternating Background (Greenbar report)")
- ' generate report 1st time to detemine the count of pages
- rep.Render()
- ' store count of pages
- Dim pageCount As Integer = rep.PageImages.Count
- ' set count of pages to tag to allow access from script
- rep.Tag = pageCount
- ' render report again
- rep.Render()
- ' show the report
- Dim dlg As C1PrintPreviewDialog = New C1PrintPreviewDialog()
- dlg.Document = rep
- dlg.ShowDialog()
复制代码
以上代码供您参考。
|