You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reporting-for-desktop/articles/report-designer/report-designer-for-winforms/add-extra-information/add-watermarks-to-a-report.md
@@ -3,34 +3,132 @@ title: Add Watermarks to a Report
3
3
---
4
4
# Add Watermarks to a Report
5
5
6
-
This tutorial describes how to add watermarks to a report and use preprinted forms.
6
+
DevExpress Reporting allows you to display text and picture watermarks on report pages. You can also specify an expression that assigns different watermarks to pages.
2. In the invoked **Watermark** dialog, select either the **Text Watermark** or **Picture Watermark** tab, depending on the type of watermark you wish to add.
17
-
18
-
For a text watermark, specify the text, direction and font options.
In the invoked **Watermark** dialog, select either the **Text Watermark** or **Picture Watermark** tab, depending on the type of watermark you wish to add.
23
+
24
+
## Specify Text Watermark Settings
25
+
26
+
Specify the following settings:
21
27
22
-
For a picture watermark, you need to specify an image. To do this, click the ellipsis button for the **Load image** option.
Specifies whether a watermark should be printed behind or in front of page content.
61
+
62
+
* Transparency
63
+
64
+
The transparency of the watermark’s text.
65
+
66
+
* Id
67
+
68
+
The unique identifier of a watermark used to specify the watermark in the WatermarkId property (See the Manage Watermark Collection section for details).
69
+
70
+
* Page Range
71
+
72
+
The range of pages which contain a watermark.
73
+
74
+
Click **OK** to add a watermark to the watermark collection. The added watermark is automatically displayed in the report in Preview mode.
75
+
76
+
> [!NOTE]
77
+
> A report can display only one watermark on a report page.
78
+
79
+
## Specify Picture Watermark Settings
80
+
81
+
Specify an image. Click the **Load image** option’s **Browse** button.
In the invoked **Select Picture** dialog, select the file containing the image that you wish to use as a watermark and click **Open**. Next, specify the size mode and alignment options for the picture.
85
+
In the invoked **Select Picture** dialog, select the file containing the image that you wish to use as a watermark and click **Open**.
27
86
28
-
Additionally, for both textual and picture watermarks, you can adjust the transparency, position (in front of or behind the document content), and the page range in which the watermark will be printed.
The mode in which a picture watermark is displayed.
96
+
97
+
* Tiling
98
+
99
+
Specifies whether a picture watermark should be tiled.
100
+
101
+
* Horizontal Alignment
29
102
30
-
> [!NOTE]
31
-
> The **Transparency** property is unavailable when you specify an SVG image.
103
+
Specifies the horizontal alignment of the watermark.
104
+
105
+
* Vertical Alignment
106
+
107
+
Specifies the vertical alignment of the watermark.
108
+
109
+
* Position
110
+
111
+
Specifies whether a watermark should be printed behind or in front of page content.
112
+
113
+
* Transparency
114
+
115
+
The transparency of the watermark’s image. The **Transparency** property is unavailable when you specify an SVG image.
116
+
117
+
* Id
118
+
119
+
The unique identifier of a watermark used to specify the watermark in the WatermarkId property (See the Manage Watermark Collection section for details).
120
+
121
+
* Page Range
122
+
123
+
The range of pages which contain a watermark.
124
+
125
+
> [!NOTE]
126
+
> A report can display only one watermark on a report page.
127
+
128
+
Click **OK** to add a watermark to the watermark collection. The added watermark is automatically displayed in the report in Preview mode.
129
+
130
+
### <aname="preprintedform"></a>Supply a Preprinted Form
32
131
33
-
## <aname="preprintedform"></a>Supply a Preprinted Form
34
132
You can use a picture watermark as a template, to display an image of the preprinted form on the report's body at design time.
35
133
36
134
To display a watermark at design time, switch to the [toolbar](../report-designer-tools/toolbar.md)'s **View** page and activate **Watermark**.
@@ -43,4 +141,71 @@ The following image illustrates a report with a watermark shown at design-time t
43
141
44
142
Place report controls on the report's body according to the layout of the preprinted form.
As a result, the image is displayed behind the table, while the text is in front of the content:
176
+
177
+

178
+
179
+
## Display a Specific Watermark in a Report
180
+
181
+
**Watermark Id** allows you to specify a watermark from the collection to display in the report. This property has a priority over the watermark’s **Page Range** property.
182
+
183
+
Create two watermarks in the Watermarks collection editor.
184
+
185
+

186
+
187
+
Set Watermark Id to Watermark2 (the Id option's value)
188
+
189
+

190
+
191
+
The image below shows the result.
192
+
193
+

194
+
195
+
## Display Watermarks According to the Specified Condition
196
+
197
+
Bind **Watermark Id** to an expression to apply watermarks stored in the collection to specific report pages.
198
+
199
+
Create the “First page watermark”, “Even page watermark”, and “Odd page watermark” watermarks with the following settings:
200
+
201
+

202
+
203
+
Specify the expression in the report’s WatermarkId property:
Follow this tutorial to create a _drill-through report_ (a user can click a Category entry to invoke a detail report with Products). This report type keeps the original report compact while still allowing access to more detailed information.
7
+
8
+
The tutorial involves two main steps:
9
+
10
+
- Add a master-detail relationship between "Categories" and "Products" reports within one project.
11
+
- Use detail report parameters to filter records based on the selected category.
## Add a Master-Detail Relationship between Reports
16
+
17
+
Define a master-detail relationship between _Category_ and _Product_ reports within a single project:
18
+
19
+
- Select the XRControl's element (**Table Cell** in this example) in the main report.
20
+
- Set its **Action** property to **NavigateToReportAction**.
21
+
- Assign the **ReportSource** property to a detail report instance.
22
+
23
+

24
+
25
+
If you switch to **Preview**, you can click on a _Category_ value in the table. The **Preview** window navigates to the detail report that contains all _Product_ entries. The next step explains how to filter this list.
## Specify Parameter Binding to Display Required Data
34
+
35
+
You can specify parameters during detail report navigation. Use the **Parameter Bindings** property to limit displayed records (such as products) to a selected category.
36
+
37
+
To invoke the **Parameter Binding Collection Editor**, click the ellipsis button in the **Parameter Bindings** property. Within this editor, click the **Sync** button to automatically obtain detail report parameters and set **Binding** to the data field or parameter of the original report.
Switch to **Preview** and click on a category entry in the master report. The **Preview** navigates to the detail report that displays only products related to the selected category.
Copy file name to clipboardExpand all lines: reporting-for-desktop/articles/report-designer/report-designer-for-winforms/use-expressions/functions-in-expressions.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ This topic lists the functions that you can use in an [expression](expressions-o
13
13
| Avg(Value) | Evaluates the average of the values in the collection. |[Products].Avg([UnitPrice]) |
14
14
| Count() | Returns the number of objects in a collection. |[Products].Count() |
15
15
| Exists() | Determines whether the object exists in the collection. |[Categories][[CategoryID] == 7].Exists() |
16
+
| Join() | Concatenates all Expression values in the _Collection_ based on the specified _Condition_ (optional) into a single string separated by the specified _Separator_ (optional). If you do not specify a _Separator_, the function uses a comma.<br>The function has the following overloads:<br>`[Collection][Condition].Join(Expression)`<br>`[Collection][Condition].Join(Expression, Separator)`| The following expression concatenates _CompanyName_ field values within a report grouped by the _CategoryID_ field into a single string separated by a semicolon:<br>`[][[CategoryID] == [^.CategoryID]].Join([CompanyName], ';')`|
16
17
| Max(Value) | Returns the maximum expression value in a collection. |[Products].Max([UnitPrice]) |
17
18
| Min(Value) | Returns the minimum expression value in a collection. |[Products].Min([UnitPrice]) |
18
19
| Single() | Returns an object if it is the only element in a collection. |[Accounts].Single() is not null |
0 commit comments