Skip to main content
A newer version of this page is available. .

ReportGenerationOptions.AutoFitToPageWidth Property

Specifies whether or not column widths are automatically modified so that the width of total columns matches the width of a View.

Namespace: DevExpress.XtraReports.ReportGeneration

Assembly: DevExpress.Printing.v18.2.Core.dll

Declaration

[XtraSerializableProperty]
[DefaultValue(DefaultBoolean.True)]
[TypeConverter(typeof(DefaultBooleanConverter))]
public DefaultBoolean AutoFitToPageWidth { get; set; }

Property Value

Type Default Description
DefaultBoolean **True**

true, to enable the auto width feature; otherwise, false.

Available values:

Name Description
True

Corresponds to a Boolean value of true.

False

Corresponds to a Boolean value of false.

Default

The value is determined by the current object’s parent object setting (e.g., a control setting).

Remarks

By default, this property value depends on the TableView.AutoWidth or GridOptionsView.ColumnAutoWidth property value, but you may change this explicitly upon report generation.


var report = new XtraReport();
var options = new ReportGenerationOptions();
options.AutoFitToPageWidth = DefaultBoolean.False;
ReportGenerationExtensions<ColumnWrapper, RowBaseWrapper>.Generate(report, tableView1, options);

If the grid’s auto width feature is enabled, setting the AutoFitToPageWidth property will have no effect on the document layout. Otherwise, this property will affect the layout of fields.

See Also