Page 1 of 1

add button with specific event

Posted: Fri Jul 21, 2017 8:57 am
by Acomis
Hi,

please, could anybody help me with situation?

Can I add in report anywhere top button?

With action:
Save file (after editing) like pdf (name is variable from database + second name from database(number order + number production manager)
Save file in specific folder (every supplier have specific folder)
attach pdf file to new outlook, with same name in sub and signature.

Who can help? :-)

for my priority number one is add the button, second part i can do :-)

[img][IMG]http://www.image-share.com/upload/3580/147m.jpg[/img][/img]

Re: add button with specific event

Posted: Mon Jul 24, 2017 10:47 am
by HighAley
Hello.

You could add the button with next code:

Code: Select all

Stimulsoft.Report.Render.StiPreviewForm previewForm = new Stimulsoft.Report.Render.StiPreviewForm();
Stimulsoft.Controls.StiButton myButton1 = new Stimulsoft.Controls.StiButton();
Stimulsoft.Controls.StiButton myButton2 = new Stimulsoft.Controls.StiButton();
myButton1.Text = "myButton1";
myButton2.Text = "myButton2";
myButton1.Click += new EventHandler(myButton1_Click);
myButton2.Click += new EventHandler(myButton2_Click);

myButton1.Dock = DockStyle.Left;
myButton2.Dock = DockStyle.Left;

previewForm.ViewerControl.ToolBar.Controls.Add(myButton2);
previewForm.ViewerControl.ToolBar.Controls.Add(myButton1);
previewForm.Show();
Thank you.

Re: add button with specific event

Posted: Tue Jul 25, 2017 10:02 am
by Acomis
Thank you man!!! :-) :-)

Re: add button with specific event

Posted: Wed Jul 26, 2017 4:56 am
by Andrew
You are welcome!