How to hide subreports that has no data

4 posts, 0 answers
  1. Wudhinun
    Wudhinun avatar
    2 posts
    Member since:
    May 2013

    Posted 05 Sep 2014 Link to this post


    I am new to Telerik Reporting and is currently like what I am seeing.
    However,  I have this scenario where I have subreports. I would like to hide these sub reports when there is no data on it.
    Currently, if there's no data it will show the reportHeadersection of that subreport to my master.

  2. Hinata
    Hinata avatar
    146 posts
    Member since:
    Dec 2013

    Posted 10 Sep 2014 in reply to Wudhinun Link to this post

    Hi Wudhinun,

    You can either use conditional formatting, or replace the SubReport with a Table item and use its NoDataMessage and NoDataStyle properties to hide it.
  3. DevCraft R3 2016 release webinar banner
  4. Wudhinun
    Wudhinun avatar
    2 posts
    Member since:
    May 2013

    Posted 10 Sep 2014 Link to this post

    Hi Hardik,

    I tried both but still the header of my subreport is still visible
  5. Stef
    Stef avatar
    2914 posts

    Posted 15 Sep 2014 Link to this post

    Hello Wudhinun,

    You can use an expression in the sub report's Report/GroupHeader as follows:
    PropertyPath: Parent.Parent.Parent.Visible
    Expression: =Count(Fields.subReportFieldValues)>0
    The Parent keyword will get the property of the corresponding parent container.

    Having into account the structure from your screenshot, it may be easier to use a Table item instead of SubReport item to display other report. Thus you can directly use the Table item's NoDataMessage.

    I hope the above information is helpful.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top