Display "No Data" message for Reports and Subreports
|Product||Progress® Telerik® Reporting|
This KB article gives a brief description of how to show "No Data" message when a report or a subreport has no data source or when the data source is empty.
- Insert a textbox in the
Report Headersection with value: "No data".
- Set the textbox property of
Add a new Conditional Formatting Rule. In the Filters section set the fields as follows:
Expression: =Count(1) Operator: = Value: =0
- Go to
Styleof the formatting rule -> uncheck the
Visiblebox -> click
OK-> select again the Style of the rule -> check
OK(This step is required because the designer needs to determine that a change has been introduced so that it re-serializes the report, otherwise the message will not change its visibility).
You can display a 'No Data' message in a sub report by using the same approach as for a Report.
If you want to hide the SubReport item and its content, then you can add a binding in the textbox item's
Bindings collection like:
Property path: Parent.Parent.Parent.Visible Expression: = Count(1)>0
The Property path has to be typed manually, where the
Parent keyword can be used as many times as needed to get the item in the Main Report, which you want to hide.
"No Data Message" feature allows you to display text, style or hide the empty space of a nested data item(Table, List, Crosstab, Graph, Map), which data source returns no records. How to: Set a No Data Message