The requested page is not available for the requested platform. You are viewing the content for Default platform.

XRPivotGrid.PrintFieldValue Event

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

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.2.dll

Declaration

public event EventHandler<CustomExportFieldValueEventArgs> PrintFieldValue
Public Event PrintFieldValue As EventHandler(Of CustomExportFieldValueEventArgs)

Event Data

The PrintFieldValue event handler receives an argument of the DevExpress.XtraReports.UI.PivotGrid.CustomExportFieldValueEventArgs type.

Remarks

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.

Examples

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