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.v24.2.Core.dll
Declaration
[DefaultValue(DefaultBoolean.True)]
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 | Return Value |
---|---|---|
True | The value is true. |
|
False | The value is false. |
|
Default | The value is specified by a global option or a higher-level object. |
|
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.