Empty Space From Nested Subreport within a Subreport

2 posts, 0 answers
  1. Warren
    Warren avatar
    24 posts
    Member since:
    May 2008

    Posted 27 May 2009 Link to this post

    Development Environment:  VS Studio 2005, ASP.NET, VB.NET, Telerik Reporting v3.0.9.430

    Problem: Trying to hide empty space of a subreport which resides within a subreport.

    Attempts so far:  Tried setting height of the detail section of both sub reports to 0.01 within the constructor.  Have all text boxes property CanShrink set to True.

    Report Design Look:

    Main Report:
    -------------------------------------------------
    Report Header Section
    -------------------------------------------------
    Detail Section with Text Boxes
    SubReport1
    -------------------------------------------------

    SubReport1 (w/Header/Footer Visible=False):
    -------------------------------------------------
    Detail Section with Text Boxes
              SubReport2
    -------------------------------------------------

    SubReport2 (w/Header/Footer Visible=False):
    -------------------------------------------------
    Detail Section with only one Text Box (CanShrink=True)
    -------------------------------------------------


    Code for both SubReport1 and SubReport2:
    Public Sub New()  
        InitializeComponent()  
        Me.DetailSection1.Height = Unit.Inch(0.01)  
        Me.DataSource = Nothing 
    End Sub 


    Report Output:
    By setting the border for the detail section of SubReport1 and SubReport2 I can see that SubReport2 is hidden yet SubReport1's detail section is still expanded for the content of SubReport2.  This report has mutliple rows returned and only a few rows will contain data within SubReport2.  SubReport1 always has data

    Here is an example of what it should look like:

                                  Example Report 1
    Patients for: Dr. Bob Burns
    Name                  DOB                   Age                   Gender
    Bob Smith           01/01/1974        35                      Male
    Nancy Apple       05/01/1976        33                      Female
              Here are some notes for Nancy Apple
    Joe Johnson       03/25/1978        31                      Male


    Here is what is really produced by the report:

                                  Example Report 1
    Patients for: Dr. Bob Burns
    Name                  DOB                   Age                   Gender
    Bob Smith           01/01/1974        35                      Male

    Nancy Apple       05/01/1976        33                      Female
              Here are some notes for Nancy Apple
    Joe Johnson       03/25/1978        31                      Male


    Any help is greatly appreciated.

    Warren
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 29 May 2009 Link to this post

    Hi Warren,

    Thank you for the incredibly thorough explanation of what you're aiming for. Setting incredibly lower value for the height of the detail section is ok, but the subreport item that holds the report has height as well. Every container item ( like section, panel and subreport) can grow to accommodate their children but cannot shrink on their own if there is no content. So basically setting the subreport's item height to 0.01 in should resolve this.

    All the best,
    Steve
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
Back to Top