This is a migrated thread and some comments may be shown as answers.

Collapsing Report Table if empty

3 Answers 117 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 20 Jun 2011, 01:48 PM
Hello,

Is it possible, that a Report Table which is bound to a
objectDataSource
in case the Method returns count 0 items, that the whole table is invisible? (SubReport)


I also have a problem, when
objectDataSource
gets count 0, I get and error in the report, I would love, that the binding would not take part in this case and return an empty report?

Thanks a lot!

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 21 Jun 2011, 04:43 PM
Hello Andreas,

We don't have out of the box solution to hide the data item when no data is available. However we have this feature logged in our Feature Tracking System and we will introduce the new option with a subsequent version of Telerik Reporting.

In the meantime there is a workaround you can use instead. Add a Binding to the table's header Textbox with
 Property Path  Expression
Parent.Visible
 =Count(1) > 0

You can do the same for a subreport just add the following binding to the subreport's header section:
 Property Path  Expression
Parent.Parent.Visible
 =Count(1) > 0

Kind regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Evangelista
Top achievements
Rank 1
answered on 22 Mar 2018, 12:29 PM

Hi,

Is this the best way yet?

thanks

0
Silviya
Telerik team
answered on 27 Mar 2018, 06:24 AM
Hello Evangelista,

Currently, you can use the "No Data Message" feature that allows you to display text, style or hide the empty space of a nested data item, which data source returns no records.
For more information, refer to How to: Set a No Data Message help article.


Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Andreas
Top achievements
Rank 1
Answers by
Peter
Telerik team
Evangelista
Top achievements
Rank 1
Silviya
Telerik team
Share this question
or