Quantcast
Channel: Developer Express Inc.
Viewing all articles
Browse latest Browse all 2370

Reporting — Display Page Watermarks by a Condition (v23.2)

$
0
0

From protecting against unauthorized use to establishing ownership and authenticity, text and picture watermarks can serve as digital fingerprints. With our most recent update (v23.2), DevExpress Reports ships with enhanced watermark capabilities – designed to display different watermarks within report documents based on page index.

Display Different Watermarks

With v23.2, the XtraReport class now features the WatermarkСollection class that stores the Watermark objects.

To manage the watermarks collection, invoke the Watermarkscollection editor:

Watermark collection editor

To apply watermarks to a specific report page, use the Watermark.PageRange property. Note that the number of watermarks is limited to one Watermark object per page. The following screenshot displays a report with three different text watermarks added to individual report pages by the page index assigned to the Watermark.PageRange property:

Watermarks displayed by a condition

Review the following help topic to learn more: Add a Watermark to the Watermark Collection.

Locate Watermark Elements on the Same Page

We split watermark position for text and image within one watermark. You can now manage PageWatermark.TextPosition and PageWatermark.ImagePosition properties of the watermark to specify whether text and picture should be displayed behind or in front of page content.

Specify watermark settings

Review the following help topic for additional information: Combine Text and a Picture in One Watermark.

Display Watermarks by a Condition

You can add watermarks to a document based on a condition using the XtraReport.WatermarkId property. This property allows you to apply a specific watermark to a page based on the watermark Id or expression binding. Note: Page.AssignWatermark takes priority over the specified WatermarkId property.

For example, the following expression adds different watermarks to the first, odd, and even pages of a report:

 Iif([Arguments.PageIndex]=0,'watermark1',Iif([Arguments.PageIndex]%2=0,'watermark2','watermark3'))

Watermark collection

Review the following help topic for additional information: Manage the Watermark Collection.

Your Feedback Counts

Let us know what you think about this new functionality. Do you see a room for further enhancement?


Viewing all articles
Browse latest Browse all 2370

Trending Articles