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

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.v19.1.dll

NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Core

Declaration

[DefaultValue(true)]
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:

Object Type Path to PrintOnEmptyDataSource
XtraReportBase
.ReportPrintOptions .PrintOnEmptyDataSource

Remarks

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.

Note

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