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

how to suppress conditional text boxes and nested tables

12 Answers 332 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 24 Jul 2013, 10:41 AM

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

 

12 Answers, 1 is accepted

Sort by
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 29 Jul 2013, 08:56 AM
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. 
0
Chris
Top achievements
Rank 1
answered on 29 Jul 2013, 10:00 AM
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
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 31 Jul 2013, 03:51 PM
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. 
0
Chris
Top achievements
Rank 1
answered on 07 Aug 2013, 07:54 AM
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
0
Stef
Telerik team
answered on 12 Aug 2013, 09:01 AM
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.

0
Ed
Top achievements
Rank 1
answered on 19 Nov 2013, 08:49 PM
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.
0
Stef
Telerik team
answered on 20 Nov 2013, 04:38 PM
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.

0
Chris
Top achievements
Rank 1
answered on 31 Jan 2014, 01:14 PM
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. 
0
Nasko
Telerik team
answered on 05 Feb 2014, 11:56 AM
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.

0
Chris
Top achievements
Rank 1
answered on 17 Jun 2014, 09:53 AM
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
0
Chris
Top achievements
Rank 1
answered on 17 Jun 2014, 10:55 AM
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.
0
Nasko
Telerik team
answered on 19 Jun 2014, 04:06 PM
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.

 
Tags
General Discussions
Asked by
Chris
Top achievements
Rank 1
Answers by
Hadib Ahmabi
Top achievements
Rank 1
Chris
Top achievements
Rank 1
Stef
Telerik team
Ed
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or