how to set watermark text in code

Stimulsoft Reports.WEB discussion
Post Reply
duheng
Posts: 8
Joined: Thu Sep 26, 2013 6:54 pm

how to set watermark text in code

Post by duheng »

Hi,

I am using stimulSoft web designer. I know that we can set the watermark text in UI. Can we do it in code and how? Thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: how to set watermark text in code

Post by HighAley »

Hello.

You could use next code to set watermark in code.

Code: Select all

report.Pages[0].Watermark.Angle = 45;
report.Pages[0].Watermark.Text = "MyWatermark"; 
Thank you.
duheng
Posts: 8
Joined: Thu Sep 26, 2013 6:54 pm

Re: how to set watermark text in code

Post by duheng »

Thanks for your reply.

I have successfully put the image into the watermark (in code behind) before launching the designer. However, the image watermark is gone when I click new->new report, or new ->new report with wizard. I want to ask, is there anyway to keep the original designer settings when we click on any menu of the designer? Thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: how to set watermark text in code

Post by HighAley »

Hello.

The watermark is not a Designer setting. This is a property of the report.
But it's possible to hide these menu items.

Thank you.
duheng
Posts: 8
Joined: Thu Sep 26, 2013 6:54 pm

Re: how to set watermark text in code

Post by duheng »

We should have these new ->report menu, and we also should have our logo watermark image in the template. Any way to do it? Thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: how to set watermark text in code

Post by HighAley »

Hello.
duheng wrote:We should have these new ->report menu, and we also should have our logo watermark image in the template. Any way to do it? Thanks.
It's possible to change this behaviour from our source code only.

Thank you.
duheng
Posts: 8
Joined: Thu Sep 26, 2013 6:54 pm

Re: how to set watermark text in code

Post by duheng »

Is there any event fired when I click new -> report or new -> new report with wizard?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: how to set watermark text in code

Post by HighAley »

Hello.
duheng wrote:Is there any event fired when I click new -> report or new -> new report with wizard?
Unfortunately, there is no such events.

Thank you.
Post Reply