This is a migrated thread and some comments may be shown as answers.

Multiple watermarks

5 Answers 309 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Janitha
Top achievements
Rank 1
Janitha asked on 27 Mar 2019, 02:48 AM

Hi,

In our report design, we need to add two watermarks depending on . Although through the designer we can add multiple text watermarks they all seem to start from the middle, which makes them overlap if both watermarks appear at the same time. Changing the Orientation also does not work because all the orientations start from the middle.

Is there a way to change the placement of the watermarks so they will no overlap?

Thank you.

5 Answers, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 29 Mar 2019, 11:13 AM
Hi Janitha,

It is true that you can add multiple watermarks, but this functionality is recommended when the combination is between text and an image. What I would propose as a workaround is to create a picture which contains both text statements. I have attached a sample report which demonstrates this solution.

You may also use two images, each containing a single statement (should appear displaced when overlapped), and set them as Picture Watermarks.
A combination of Picture and Text Watermark may also work.

Regards,
Neli
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Souvik
Top achievements
Rank 1
Iron
answered on 31 Jan 2025, 02:50 PM | edited on 05 Feb 2025, 11:56 AM

Hi Neli,

But while setting Picture as watermark how to set expression there.

As like Text Watermark we have Text property there we can set the Expression so based on condition we can apply Watermark Text.

Even Multiple text not supporting its showing only single text on per page.

 

In case of Picture watermark we are unable to find place where we will add Expression so based on condition, we will apply picture watermark logic?.

 

snapshot for reference

 

Thanks

Dimitar
Telerik team
commented on 05 Feb 2025, 12:32 PM

Hi Souvik,

You can add multiple Picture/Text watermark items as the Report.PageSettings.Watermarks property is a WatermarkCollection, for example:

Regarding the expression when using a Text watermark, please note that the fields of the report cannot be accessed in this context. You can use static text and/or string report parameters instead:

0
Souvik
Top achievements
Rank 1
Iron
answered on 06 Feb 2025, 04:45 AM | edited on 06 Feb 2025, 06:11 AM

Hi Dimitar,

I am experiencing an issue with watermarks in Telerik Reporting:

  1. Text Watermark Issue

    • When I preview the report, the watermark appears multiple times per page.
    • However, when I export it as a PDF, it appears (only once per page). I need Watermark multiple time like preview.
    • I am using the PageSettings → Watermark → TextWatermark property.
    • Is there any setting I should adjust to ensure consistent behavior in both preview and PDF export?
  2. Dynamic Picture Watermark

    • I need to apply a Picture Watermark dynamically based on a report parameter.
    • Where should I set the expression for the PictureWatermark.Value property?
    • I want to show different watermark images depending on a report parameter.

I have attached screenshots of the issue for reference. Please let me know how I can resolve these issues.

Thanks,

0
Dimitar
Telerik team
answered on 10 Feb 2025, 12:53 PM

Hello Souvik,

Thank you for the attached screenshots and the additional information!

Text Watermark Issue

I assume that the multi-line text is achieved by using a single string where the additional lines are added with the newline character, is that correct?

Please note that there is a known limitation of the PDF rendering extension where newline characters are not respected in the Text Watermarks.

You may read more information on the topic in the PDF Rendering Design Considerations at a glance - Telerik Reporting article.

The only workaround that I see would be to display the text as an image through the Picture Watermark option.

Dynamic Picture Watermark

To provide the image dynamically, you can create a string report parameter - Adding Report Parameters Explained - Telerik Reporting

This parameter will take the image as a base64 string so to achieve this, you would need to be able to convert your images into base64 strings.

Then, you will set the value of this report parameter on the Image property of the PIcture Watermark, for example:

With this approach, you can change the image by providing a new base64 string to the report parameter.

Note that you will need to use the Standalone Report Designer to implement this setup as the Web Report Designer offers only setting a static value to the Image property of the Picture Watermark.

Wrapping Up

I hope that the provided information and suggestions will help. Please let me know if I can assist with anything else.

Regards,
Dimitar
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
0
Souvik
Top achievements
Rank 1
Iron
answered on 13 Feb 2025, 05:51 AM | edited on 13 Feb 2025, 11:39 AM

Hi Dimitar,

Thank you for your response.

Text Watermark Issue

I have implemented the following logic for the text watermark issue:

=If(Parameters.valid.Value<>0, "Draft Document. Draft Document. Draft Document. Draft Document. Draft Document.", "")

Could you confirm if this approach not supporting is there any way to achieve?

Dynamic Picture Watermark

Is there a workaround to use a dynamic picture watermark in a Web Report?

TRDP File Usage in Standalone Report Designer

If we use the Standalone Report Designer, can we open and edit a .trdp file created for a Web Report in it?

 

also, I check below screen shot which u posted above

 

"When I enter Parameters.imagewatermark.Value (which contains a Base64 value, as you mentioned above) and then press Tab or OK, it comming back to a string in that field. I have attached a screenshot for your reference."

Let me know if you need further refinements!

 

Is there any way to connect with you?

Looking forward to your guidance.

Best regards,

Souvik

Dimitar
Telerik team
commented on 17 Feb 2025, 02:18 PM

Hi Souvik,

Text Watermark Issue

This approach will indeed not work because the newline characters, which is what is used for the text to go to another line in your example, are not going to be respected when the report is rendered to PDF.

Dynamic Picture Watermark and TRDP File Usage in Standalone/Web Report Designer

Once you have edited the report in the Standalone Report Designer to add the dynamic picture approach, you can keep using the same report in the Web Report Designer.

The limitation is related only to the UI of the Web Report Designer regarding the Picture Watermarks but once you have configured that in the desktop designer app, there shouldn't be any issues when you preview it in the Web Report Designer.

Regarding the last question about the value appearing as a String in the editor window, yes, this is expected and you can ignore it. As long as the value of the report parameter is a vali base64 string, the picture watermark should appear when you export the report to PDF.

Remote Assistance

If I understand correctly, in the very last question, you are asking about remote assistance, is that correct?

Please note that remote web assistance sessions are available only for DevCraft Ultimate licenses - Purchase Telerik Software Development Tools.

If you wish to arrange such a session, you will need to purchase this license and open up a support ticket.

 

Tags
General Discussions
Asked by
Janitha
Top achievements
Rank 1
Answers by
Neli
Telerik team
Souvik
Top achievements
Rank 1
Iron
Dimitar
Telerik team
Share this question
or