stipage.pagepainting event does not work on export

Stimulsoft Reports.NET discussion
Post Reply
eric.ms.wong
Posts: 10
Joined: Sun Apr 05, 2009 5:54 am
Location: Hong Kong

stipage.pagepainting event does not work on export

Post 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?

Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

stipage.pagepainting event does not work on export

Post 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.
Post Reply