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

How to hide subreports that has no data

3 Answers 397 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Wudhinun
Top achievements
Rank 1
Wudhinun asked on 05 Sep 2014, 06:32 PM
Hi,

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.

Thanks

3 Answers, 1 is accepted

Sort by
0
Hinata
Top achievements
Rank 1
answered on 10 Sep 2014, 08:21 AM
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.
0
Wudhinun
Top achievements
Rank 1
answered on 10 Sep 2014, 09:53 PM
Hi Hardik,

I tried both but still the header of my subreport is still visible
0
Stef
Telerik team
answered on 15 Sep 2014, 05:22 PM
Hello Wudhinun,

You can use an expression in the sub report's Report/GroupHeader as follows:
Binding
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.

Regards,
Stef
Telerik
 

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.

 
Tags
Report Designer (standalone)
Asked by
Wudhinun
Top achievements
Rank 1
Answers by
Hinata
Top achievements
Rank 1
Wudhinun
Top achievements
Rank 1
Stef
Telerik team
Share this question
or