Collapsing Report Table if empty

4 posts, 0 answers
  1. Andreas
    Andreas avatar
    1 posts
    Member since:
    Jun 2011

    Posted 20 Jun 2011 Link to this post

    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!
  2. Peter
    Admin
    Peter avatar
    1671 posts

    Posted 21 Jun 2011 Link to this post

    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
  3. Evangelista
    Evangelista avatar
    3 posts
    Member since:
    Mar 2011

    Posted 22 Mar 2018 in reply to Peter Link to this post

    Hi,

    Is this the best way yet?

    thanks

  4. Silviya
    Admin
    Silviya avatar
    434 posts

    Posted 27 Mar 2018 Link to this post

    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
Back to Top