Page 1 of 1

stipage.pagepainting event does not work on export

Posted: Tue Oct 20, 2009 1:39 pm
by eric.ms.wong
I am using the OnPagePainting event to add a watermark on each pages. It works fine on preview and print but not on export. How can I resolve it or any others way to add watermark on exported format?


stipage.pagepainting event does not work on export

Posted: Tue Oct 20, 2009 3:09 pm
by Edward
Hi

You will receive a watemark in the exported document if Page.Watermark.Image property contain that image you need to draw. Is it possible to modify the report template (mrt file) and add a watermark to it?

You can also use the following code:

Code: Select all

StiReport report = new StiReport();
report.Compile();
report.CompiledReport.Pages[0].Watermark.Image = Image.FromFile(Application.StartupPath+ "\\sunny day.jpg");
report.Show();
Thank you.