how to suppress conditional text boxes and nested tables

13 posts, 0 answers
  1. Chris
    Chris avatar
    9 posts
    Member since:
    Jul 2013

    Posted 24 Jul 2013 Link to this post

    I’m having some issues with the report rendering when using conditional visibility and lists.  

    To start with, the text box with conditional visibility ( based on the value of the field) doesn’t “suppress” the area of the panel, which causes problems with single line text boxes (this is reproduced in the second case/page where there are no comments on Sheet.

    Secondly, when there is no items on the nested table inside a list and the “empty” space is not “suppressed”. This case is shown in the fifth case/page where the Education doesn’t contain any Certificates.

     

    The conditional visibility is implemented in all cases with Bindings such as:

    Fields.CertificateList.Count >0

    Here is a brief data structure:

     Sheet

                     Description

                     Score

                     Comments (multiline)

                    List<SheetTrace>

                    List<Education>

     

    SheetTrace

                    Date

                     Username

                    Action

                    Comments (multiline)

     

    Education

                     Title

                    School

                    Comments (multiline)

                    List<Certificate>

     Certificate

                Class

                Grade

    The report is designed with the following layout:

    masterPanel -> maps to Sheet

    panel1 -> maps to SheetTrace and contains a Table object to show  traces.

    panel2 -> maps to Education and contains a List which shows Education items and a nested Table which shows Certificates.


    The layout of the report and a set of sample screens are attached.

    The installed Telerik report version is :Q2 2013, 7.1.13.612 under Visual Studio 2010 SP1
    A complete self-contained project is available at your request.

    Thanks in advance,
    Chris

     

  2. Hadib Ahmabi
    Hadib Ahmabi avatar
    181 posts
    Member since:
    Nov 2011

    Posted 29 Jul 2013 Link to this post

    Even if the textboxes are hidden, the Panel maintains its space, so it won't shrink. If you want panels to shrink when textboxes are hidden, you need to make them smaller. For e.g. in the constructor after the InitializeComponent method call, you can set the Panel size to a very small number.
    this.panel1.Height = Unit.Cm(0.1);
    This way, if you have textboxes, the panel will stretch, but if the textboxes are hidden, the panel will remain short and will not take up unnecessary space. 
  3. DevCraft banner
  4. Chris
    Chris avatar
    9 posts
    Member since:
    Jul 2013

    Posted 29 Jul 2013 Link to this post

    You are correct, but in this case the panels don't automatically "reclaim" the empty space, so its required to do some form of docking. Is that correct or I'm missing something?

    Regards
    Chris
  5. Hadib Ahmabi
    Hadib Ahmabi avatar
    181 posts
    Member since:
    Nov 2011

    Posted 31 Jul 2013 Link to this post

    Well, a panel won't automatically go up if the previous shrinks.
    In this case, you can maybe put all panels withing a panel and use Docking = Top. 

    Another option is to loose the panels (why do you need them anyway?). If you remove the panels when a row of textboxes disappears, automatically the empty space taken by them will collapse. 
  6. Chris
    Chris avatar
    9 posts
    Member since:
    Jul 2013

    Posted 07 Aug 2013 Link to this post

    In my case, panels are used to conditionally show the information contained in them. The alternative is to put the visibility binding condition on each item which is a little bit strange. However, I try setting the panel height with a minimum value (Unit.Cm(0.1)) but even in this case the panel size remain the same.

    Chris
  7. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 12 Aug 2013 Link to this post

    Hello Chris,

    Please take a look at the attached sample project. We have added a binding to the Panel.Height property to set it to a smaller value. If the Table item within the panel grows, the Panel will grow vertically also.

    I hope this helps.

    Regards,
    Stef
    Telerik

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

  8. Ed
    Ed avatar
    9 posts
    Member since:
    Jun 2010

    Posted 19 Nov 2013 Link to this post

    No matter how the panel and/or list is adjusted through bindings, if the panel is nested, it never shrinks smaller than the design height.
  9. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 20 Nov 2013 Link to this post

    Hi Ed,

    If the Panel is nested within a Table/List/Crosstab item cell, in order to hide the row(and the Panel correspondingly) is to filter out the row. This can be done by setting a Filter expression for the table's row group using the Group Explorer.

    Regards,
    Stef
    Telerik

    New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

  10. Chris
    Chris avatar
    9 posts
    Member since:
    Jul 2013

    Posted 31 Jan 2014 in reply to Stef Link to this post

    Hi Stef,

    What kind of expression should I set in order to suppress the nested table (which its datasource is set with a Binding)?
    I was trying the fix the issue with an elegant, programmatic way instead of setting small values for the height property  at design time. 
  11. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 05 Feb 2014 Link to this post

    Hello Chris,

    As Stef suggested in her post, the elegant solution is to filter the row group in the parent data item of the table. More information on the topic can be found in the Filtering Data help article.

    Regards,
    Nasko
    Telerik

    New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

  12. Chris
    Chris avatar
    9 posts
    Member since:
    Jul 2013

    Posted 17 Jun 2014 Link to this post

    I've managed to create a report with multiple panels and nested (collapsable) table and table rows that worked properly with the 6.2.12.1123 version of the Telerik Reports. Upgrading to the latest version (8.0.14.507) proved to be a great disaster since most of report functionality does not work as previously thus made upgrade impossible.

    To be more specific, I've encounter the following issues:
     * Print layout mode produces additional blank page at the end.
     * Report docked panels do not print correctly (they overlap)
     * Report headers expand without reasons.

    I would like some help regarding the issues.

    Many thanks
  13. Chris
    Chris avatar
    9 posts
    Member since:
    Jul 2013

    Posted 17 Jun 2014 in reply to Chris Link to this post

    To demonstrate the issues, I've attached several files showing the issues.

    Case #1 - demonstrate the empty page issue
    Case #2 - demonstrate the panel overlapping issue.
    Case #3 - demonstrate the header issue.
  14. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 19 Jun 2014 Link to this post

    Hello Chris,

    1. Some changes have been made to the rendering mechanism in the past years and it is possible to see a different behavior when upgrading from Q3 2012 to Q1 2014 SP1. In order to determine what is causing the additional page in Print Preview and fix it, please follow the Problem: Telerik Reporting renders blank pages KB article.
    2. In order to achieve automatic or tabular layout, please try to use a List or Table item instead of Panel items with docking.
    3. We are not sure what exactly is causing the section to expand, but you can set different styles to the text boxes in the section and this may show which item is stretching the section. If you don't find anything suspicious, please send us a sample report definition exhibiting the issue, so we can review it locally and pinpoint the culprit.

    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
DevCraft banner