Back to Devexpress

XRLabel.ProcessDuplicatesMode Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrlabel-75d7f63a.md

latest6.2 KB
Original Source

XRLabel.ProcessDuplicatesMode Property

Specifies how to process a XRLabel control with duplicate values. See the ProcessDuplicatesMode enumeration description for information on the different duplicate processing modes.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[Browsable(true)]
public override ProcessDuplicatesMode ProcessDuplicatesMode { get; set; }
vb
<Browsable(True)>
Public Overrides Property ProcessDuplicatesMode As ProcessDuplicatesMode

Property Value

TypeDescription
ProcessDuplicatesMode

A ProcessDuplicatesMode enumeration value.

|

Available values:

NameDescription
Leave

Leaves all controls with identical values as is.

| | Merge |

Merges controls with consecutive identical values into a single control. Note that this mode ignores controls with null values. Use the control’s ProcessNullValues property to process controls with null values.

| | Suppress |

Removes all controls with consecutive identical values except the first control. Substitutes the removed controls with blank space.

| | SuppressAndShrink |

Does the same as the Suppress mode and then shrinks blank space. Note that this mode cannot be used for intersecting controls and vertical bands.

|

Remarks

Use this property to process duplicate values of the XRLabel‘s Text or Tag property. Use the XRLabel‘s ProcessDuplicatesTarget property to set one of them.

The sample report screenshots below show how different duplicate processing modes are applied to the XRLabel control in the Country column.

Report Layout

Mode: Leave

Mode: Merge

Mode: Suppress

Mode: Suppress And Shrink

Note that if there are no controls on a band after duplicate values are removed, the band is not printed.

Mode: Leave

Mode: Suppress

In the previous images, all the values of the second and third table row are the same. After the duplicates on the third line are removed, the band is empty. Although the duplicate processing mode is set to Suppress , the band is not printed.

For more information, review the following help topics:

View Example: How to process duplicate values in a report

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ProcessDuplicatesMode property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

reporting-winforms-process-duplicate-values/CS/ProcessDuplicatesTarget/ProductReport.cs#L25

csharp
this.xrTableCell2.ExpressionBindings.Add(expressionBinding);
this.xrTableCell2.ProcessDuplicatesMode = ProcessDuplicatesMode.Merge;
this.xrTableCell2.ProcessDuplicatesTarget = DevExpress.XtraReports.UI.ProcessDuplicatesTarget.Tag;

reporting-winforms-process-duplicate-values/VB/ProcessDuplicatesTarget/ProductReport.vb#L22

vb
Me.xrTableCell2.ExpressionBindings.Add(expressionBinding)
Me.xrTableCell2.ProcessDuplicatesMode = ProcessDuplicatesMode.Merge
Me.xrTableCell2.ProcessDuplicatesTarget = DevExpress.XtraReports.UI.ProcessDuplicatesTarget.Tag

See Also

ProcessDuplicatesTarget

XRLabel Class

XRLabel Members

DevExpress.XtraReports.UI Namespace