I'm using a class to show and edit reports. I'm trying to add a custom button to the preview toolbar, but it won't work.
Here is the code i use.
Code: Select all
//first i create the report object
StiReport rReport = new StiReport();
//then i do some loading stuff.....
//code for adding custom button
StiPreviewForm frmPrev = new StiPreviewForm(rReport);
Stimulsoft.Controls.Win.DotNetBar.ButtonItem btnEdit = new Stimulsoft.Controls.Win.DotNetBar.ButtonItem();
btnEdit.Text = "TestButton";
btnEdit.Click += new EventHandler(btnEdit_Click);
btnEdit.Visible = true;
frmPrev.ViewerControl.ToolBar.Items.Add(btnEdit);
//show the report
rReport.Show();
Thanks
cleanac