Version

Fit All Fields on a Single Page

When you print or export a DataPresenter control and there is insufficient space to fit all fields on a single page, the WPF Reporting engine automatically places the extra fields on another page. However, you can modify this behavior so that the WPF Reporting engine scales and fits all fields onto a single page.

Note
Note

The WPF Reporting engine will print the contents of xamDataCarousel™ and xamDataCards™ in a tabular format just like xamDataGrid™.

The following example code demonstrates how to fit all fields on a single page when you print or export a xamDataGrid control. The example code creates a report using a xamDataGrid control; however, you can replace the xamDataGrid control with any of the DataPresenter controls.

In Visual Basic:

Imports Infragistics.Windows.Reporting
...
'The first three lines use the xamDatagrid control to create a report
Dim report1 As New Report()
Dim section1 As New EmbeddedVisualReportSection(Me.xamDataGrid1)
report1.Sections.Add(section1)
report1.ReportSettings.HorizontalPaginationMode = HorizontalPaginationMode.Scale
report1.Print()
...

In C#:

using Infragistics.Windows.Reporting;
...
//The first three lines use the xamDataGrid control to create a report
Report report1 = new Report();
EmbeddedVisualReportSection section1 = new EmbeddedVisualReportSection(this.xamDataGrid1);
report1.Sections.Add(section1);
report1.ReportSettings.HorizontalPaginationMode = HorizontalPaginationMode.Scale;
report1.Print();
...