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

How to set Sub Report's visibilty as per Row Count of Sub Report's Datasource?

6 Answers 202 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shimoli
Top achievements
Rank 1
Shimoli asked on 10 Jun 2011, 02:10 PM
I have used Telerik reporting service for my silverlight application.In my main report there is a sub-report.Both have own Datasource and I have pass Main report's One Field value as parameter value of Sub-report to get relevant data only.Everything is working fine.Now In case of zero record in Datasource of Sub-Report,I do not want to Display Sub-Report.I have try to make aggregate field(=Count(FieldName) and as per it's value I thought I will be able to know whether want to display report or not.But I am getting TextBox.Value equal to "=Count(FieldName)" inseated of any numeric value. I have use SQL Datasource.Let me know what to do in such scenario?

6 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 13 Jun 2011, 09:00 AM
Hello Shimoli,

Check the following blog post that elaborates on the matter.

Best wishes,
Steve
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
Shimoli
Top achievements
Rank 1
answered on 13 Jun 2011, 09:42 AM
Thank Yo so much.It works fine.
0
Yanli
Top achievements
Rank 1
answered on 13 Aug 2013, 07:58 PM
I'm using Telerik Reporting Q2 2013, and the solution in the blog post is not working any more. Is there an update for this?

Thanks a lot!
0
Elian
Telerik team
answered on 16 Aug 2013, 11:11 AM
Hello Yanli,

The approach described in the blog post is correctly working with the latest version. Please note that this counts the number of detail sections of the inner report. This means that the SubReport will be hidden only if the count is =0.
This happens if you have a DataSource set for the inner report and this DataSource returns exactly 0 rows.
If you do not have a DataSource assigned to the inner report (or it is null), this will produce a report with a single detail section and will not fulfill the condition needed in order to hide the SubReport item.
 

Regards,
Elian
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

0
JDP
Top achievements
Rank 1
answered on 17 Nov 2014, 08:01 PM
Getting a 404 error on the link to the Blog post used as a reference in this thread.
0
Nasko
Telerik team
answered on 20 Nov 2014, 04:04 PM
Hello James,

The blog post is available here.

Regards,
Nasko
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
General Discussions
Asked by
Shimoli
Top achievements
Rank 1
Answers by
Steve
Telerik team
Shimoli
Top achievements
Rank 1
Yanli
Top achievements
Rank 1
Elian
Telerik team
JDP
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or