Page 1 of 1

Show Watermark on selected Pages

Posted: Tue Aug 15, 2017 12:09 pm
by vorauler
Hi

I must come back to this post after the upgrade to Version 2017.1.10 from 2015.3.0. The same sample as in 2011.
viewtopic.php?f=8&t=4417&p=19314&hilit=watermark#p19314

Code: Select all

var data = new List<ReportPrintValue>();
data.Add(new ReportPrintValue { Nachname = "Person1", Vorname = "Test", ShowWatermark = true, WatermarkText = "Person1 Watermark" });
data.Add(new ReportPrintValue { Nachname = "Person2", Vorname = "Test", ShowWatermark = false });
data.Add(new ReportPrintValue { Nachname = "Person3", Vorname = "Test", ShowWatermark = false });
data.Add(new ReportPrintValue { Nachname = "Person4", Vorname = "Test", ShowWatermark = false });
data.Add(new ReportPrintValue { Nachname = "Person5", Vorname = "Test", ShowWatermark = true, WatermarkText = "Person5 Watermark" });
data.Add(new ReportPrintValue { Nachname = "Person6", Vorname = "Test", ShowWatermark = false });
data.Add(new ReportPrintValue { Nachname = "Person7", Vorname = "Test", ShowWatermark = false });
On the Page Event Rendering

Code: Select all

Page1.Watermark.Enabled = Insurant.ShowWatermark;
Page1.Watermark.Text = Insurant.WatermarkText
This produce the watermark on the page with record from Person2 and Person6 instead on Person1 and Person5.

Attached is my sample and hope you can give my a quick answer with the corretion. I couldn't attach the complete solution, the size was too big.

TIA
Ralf

Re: Show Watermark on selected Pages

Posted: Sat Aug 19, 2017 12:10 pm
by HighAley
Hello.

Please, try to use the Before Print event of the page.

Thank you.

Re: Show Watermark on selected Pages

Posted: Thu Sep 07, 2017 9:41 am
by vorauler
Hello

Sorry for my late response but I was in holidays.

Your hint doesn't work for me. Now I get a watermark on page 1, page 2 and page 6 instead on page 1 and page 5.
Any other hint? Otherwise I must go back to the release 2015.X.X.?

Ralf

Re: Show Watermark on selected Pages

Posted: Thu Sep 07, 2017 10:21 am
by vorauler
Hi

I have created a little sample that you will find here (Project WatermarkBug).
https://www.dropbox.com/s/q782imzezsilt ... s.zip?dl=0

Ralf

Re: Show Watermark on selected Pages

Posted: Fri Sep 08, 2017 2:11 pm
by HighAley
Hello.

We have made some changes in your report.
Now it's working as expected.
We are using the Get Tag and After Print events of the Data band.

Thank you.