Edit this page

PivotGridPrintStyle

Printing in RadPivotGrid is performed by a PivotGridPrintStyle object. It provides different properties and events you can use to modify the appearance of the printouts. You can access the PivotGridPrintStyle by using the PrintStyle property of RadPivotGrid.

You can modify the default font of the different cell types by using the following properties:

Setting Print Font

this.radPivotGrid1.PrintStyle.DataCellsFont = new Font("Segoe UI Light", 8, FontStyle.Regular);
this.radPivotGrid1.PrintStyle.HeaderCellsFont = new Font("Segoe UI Light", 8, FontStyle.Bold);
this.radPivotGrid1.PrintStyle.DecriptorsFont = new Font("Segoe UI Light", 9, FontStyle.Regular);
this.radPivotGrid1.PrintStyle.SubTotalCellsFont = new Font("Segoe UI Light", 8, FontStyle.Italic);
this.radPivotGrid1.PrintStyle.GrandTotalCellsFont = new Font("Segoe UI Light", 8, FontStyle.Italic | FontStyle.Bold);

Me.radPivotGrid1.PrintStyle.DataCellsFont = New Font("Segoe UI Light", 8, FontStyle.Regular)
Me.radPivotGrid1.PrintStyle.HeaderCellsFont = New Font("Segoe UI Light", 8, FontStyle.Bold)
Me.radPivotGrid1.PrintStyle.DecriptorsFont = New Font("Segoe UI Light", 9, FontStyle.Regular)
Me.radPivotGrid1.PrintStyle.SubTotalCellsFont = New Font("Segoe UI Light", 8, FontStyle.Italic)
Me.radPivotGrid1.PrintStyle.GrandTotalCellsFont = New Font("Segoe UI Light", 8, FontStyle.Italic Or FontStyle.Bold)

In a similar fashion, you can modify the background color for the different cell types:

Setting Background Color

this.radPivotGrid1.PrintStyle.CellBackColor = Color.Wheat;
this.radPivotGrid1.PrintStyle.HeadersBackColor = Color.Gray;
this.radPivotGrid1.PrintStyle.DescriptorsBackColor = Color.Yellow;
this.radPivotGrid1.PrintStyle.SubTotalsBackColor = Color.LightBlue;
this.radPivotGrid1.PrintStyle.GrandTotalsBackColor= Color.Blue;

Me.radPivotGrid1.PrintStyle.CellBackColor = Color.Wheat
Me.radPivotGrid1.PrintStyle.HeadersBackColor = Color.Gray
Me.radPivotGrid1.PrintStyle.DescriptorsBackColor = Color.Yellow
Me.radPivotGrid1.PrintStyle.SubTotalsBackColor = Color.LightBlue
Me.radPivotGrid1.PrintStyle.GrandTotalsBackColor = Color.Blue

Sometimes the reports generated by RadPivotGrid can be larger than a single page. In this case you can choose to scale the report so that it fits the page area:

Scaling Printed Pivot

this.radPivotGrid1.PrintStyle.ScaleMode = Telerik.WinControls.UI.PivotPrintScaleMode.FitAll;

Me.radPivotGrid1.PrintStyle.ScaleMode = Telerik.WinControls.UI.PivotPrintScaleMode.FitAll

If you do not want to scale the report, you can choose the order in which pages are printed:

Setting Page Order

this.radPivotGrid1.PrintStyle.PageOrder = Telerik.WinControls.UI.PivotGridPrintPageOrder.DownThenOver;

Me.radPivotGrid1.PrintStyle.PageOrder = Telerik.WinControls.UI.PivotGridPrintPageOrder.DownThenOver

To save some spaces, you can enable CompactLayout mode for the printed pages:

CompactLayout Mode

this.radPivotGrid1.PrintStyle.LayoutType = Telerik.WinControls.UI.PivotLayout.Compact;
this.radPivotGrid1.PrintStyle.ComactLayoutIndent = 20;

Me.radPivotGrid1.PrintStyle.LayoutType = Telerik.WinControls.UI.PivotLayout.Compact
Me.radPivotGrid1.PrintStyle.ComactLayoutIndent = 20

Additionally, if you do not want to print the entire report but only the selected parts, you can set the following property:

Print Selection

this.radPivotGrid1.PrintStyle.PrintSelectionOnly = true;

Me.radPivotGrid1.PrintStyle.PrintSelectionOnly = True

See Also