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

7 posts, 0 answers
  1. Shimoli
    Shimoli avatar
    16 posts
    Member since:
    May 2011

    Posted 10 Jun 2011 Link to this post

    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?
  2. Steve
    Admin
    Steve avatar
    10940 posts

    Posted 13 Jun 2011 Link to this post

    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
  3. Shimoli
    Shimoli avatar
    16 posts
    Member since:
    May 2011

    Posted 13 Jun 2011 Link to this post

    Thank Yo so much.It works fine.
  4. Yanli
    Yanli avatar
    9 posts
    Member since:
    Sep 2012

    Posted 13 Aug 2013 Link to this post

    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!
  5. Elian
    Admin
    Elian avatar
    435 posts

    Posted 16 Aug 2013 Link to this post

    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.

  6. JDP
    JDP avatar
    14 posts
    Member since:
    Mar 2008

    Posted 17 Nov 2014 in reply to Elian Link to this post

    Getting a 404 error on the link to the Blog post used as a reference in this thread.
  7. Nasko
    Admin
    Nasko avatar
    1050 posts

    Posted 20 Nov 2014 Link to this post

    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.

     
Back to Top