Version

Modify the Page Layout of a Report

You can programmatically modify page layout settings when you print or export a report. Most of the time, you do not have to modify page layout settings since your end users can modify them through the print dialog. However, you can set page layout properties off the ReportSettings property of a Report object if you are printing or exporting a report without displaying a print dialog or if you want to override default page layout settings.

The following example code demonstrates how to modify the page layout of a report. The example code sets a one-inch margin on all sides and scales the content horizontally so it fits on a single page.

In Visual Basic:

Imports Infragistics.Windows.Reporting
...
Dim report1 As New Report()
report1.ReportSettings.Margin = new Thickness(96)
report1.ReportSettings.HorizontalPaginationMode = HorizontalPaginationMode.Scale
...

In C#:

using Infragistics.Windows.Reporting;
...
Report report1 = new Report();
report1.ReportSettings.Margin = new Thickness(96);
report1.ReportSettings.HorizontalPaginationMode = HorizontalPaginationMode.Scale;
...