回复 1楼pmway的帖子
pmway 你好,
可以通过以下方法添加按钮:
- private ToolStrip CreateReportToolbar()
- {
- return new ToolStrip(new ToolStripButton[]
- {
- EndUserDesigner.CreateToolStripButton("New",Images.CmdNewReport,new EventHandler(this.OnNew),"New"),
- EndUserDesigner.CreateToolStripButton("Open",Images.CmdOpen,new EventHandler(this.OnOpen),"Open"),
- EndUserDesigner.CreateToolStripButton("Save",Images.CmdSave,new EventHandler(this.OnSave),"Save"),
- EndUserDesigner.CreateToolStripButton("页面尺寸",Images.CmdSave,new EventHandler(this.ChangePageSize),"页面尺寸")
- });
- }
复制代码
通过事件拿到报表然后设置纸张:
- private void ChangePageSize(object sender, EventArgs e)
- {
- SectionReport sr = this.reportdesigner.Report as SectionReport;
- //拿到报表后自定义窗体设置纸张大小
- }
复制代码 |