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

Syntax

public bool PrintOnEmptyDataSource { get; set; }

Returns

Type Description
Boolean

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

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