New to Telerik UI for WinFormsStart a free 30-day trial

PivotGridPrintStyle

Updated over 6 months ago

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

C#
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);

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

Setting Background Color

C#
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;

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

C#
this.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

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

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

CompactLayout Mode

C#
this.radPivotGrid1.PrintStyle.LayoutType = Telerik.WinControls.UI.PivotLayout.Compact;
this.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:

C#
this.radPivotGrid1.PrintStyle.PrintSelectionOnly = true;

See Also

In this article
See Also
Not finding the help you need?
Contact Support