XRPivotGrid.PrintFieldValue Event

Enables you to render a different content for individual field values.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v20.2.dll


public event EventHandler<CustomExportFieldValueEventArgs> PrintFieldValue

Event Data

The PrintFieldValue event's data class is DevExpress.XtraReports.UI.PivotGrid.CustomExportFieldValueEventArgs.


The PrintFieldValue event is raised for each field value when the XRPivotGrid is being printed. You can handle this event to change the field value’s appearance and contents in a printed document.


This example demonstrates how to change the appearance of Pivot Grid value fields displayed in the column area using the XRPivotGrid.PrintFieldValue event.

using System;
using System.Drawing;
using DevExpress.XtraReports.UI;
using DevExpress.XtraPrinting;
// ...

private void xrPivotGrid1_PrintFieldValue(object sender, DevExpress.XtraReports.UI.PivotGrid.CustomExportFieldValueEventArgs e) {
    if (e.Field != null && e.Field.Area == DevExpress.XtraPivotGrid.PivotArea.ColumnArea) {
        LabelBrick lb = new LabelBrick();
        lb.BackColor = Color.Beige;
        lb.Padding = new PaddingInfo(2, 2, 5, 2, GraphicsUnit.Pixel);
        lb.Text = e.Text;
        e.Brick = lb;
See Also