Skip to main content

ReportPrintOptions.PrintOnEmptyDataSource Property

Specifies whether or not a report should be printed if its data source is empty.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v22.2.dll

NuGet Package: DevExpress.Reporting.Core


public bool PrintOnEmptyDataSource { get; set; }

Property Value

Type Default Description
Boolean true

true to allow printing a report when its data source is empty; otherwise false.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to PrintOnEmptyDataSource
WinForms Controls XtraSchedulerReport
Reporting DetailReportBand


Set the PrintOnEmptyDataSource property value to false, to avoid generating a report when its data source is empty.

This property is in effect every time you create a report document (the XtraReport.CreateDocument method is called), irrespective of whether it’s being printed, exported or previewed.


Since this property is declared in a base ReportPrintOptions class, it is intended to provide this functionality for both the XtraReport and DetailReportBand classes. Therefore, this makes it possible to hide not only the master report when its data source is empty, but also the detail report when its data source contains no data.

To specify the number of times the Detail band is printed, you have the following options.

See Also