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

Binding Section Height

3 Answers 586 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 15 Apr 2014, 05:02 PM
I have a section of a subreport that I need to force to be a certain height (7.5 inches).  The section contains a Table, which can grow based on the contents.  If the rows do not grow individually, then the section stays 7.5", but if a row grows to fit its contents, it forces the entire section to grow, even though it does not cause the Table to grow beyond 7.5".  Is there a way to set the height of a section AFTER the table is data bound, so that I can force the section to be 7.5", regardless of the height of the Table?

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 18 Apr 2014, 05:18 PM
Hi Brian,

If the table item never grows beyond 7.5in, you can use a Binding to the section's Height property as follows:
Property path: Height
Expression: ='7.5in'
The above will size the section to 7.5in regardless the size of its content, as long as the content does not grow more than the available space. For more details check our Design Considerations for Report Item Layout article.

Other approach is to set all Table's nested items' CanGrow properties of  to false, which will keep each row with the same size.

I hope this information helps you.

Regards,
Stef
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.

 
0
Brian
Top achievements
Rank 1
answered on 18 Apr 2014, 06:21 PM
Thanks for the reply Stef.  I tried Binding the Height property to ='7.5in' and that seems to at least work as far as binding the height, but the section still grows larger when the Table has multiple items (even if the rows do not grow).  Unfortunately, I need to allow the rows to grow in case there is text that is too long to display on a single line.

I tried setting the height of the ReportHeader to 7.5in and also binding it to ='7.5in' but either way, when there are multiple items in the table, the section bleeds into another page because I only have 7.65in total space alloted for that subreport.  It looks like I will probably just have to live with my footer showing at the end of the group instead of trying to force it to the bottom of the page.
0
Stef
Telerik team
answered on 23 Apr 2014, 03:50 PM
Hello Brian,

If the Table item grows vertically beyond the available space in the container, the container will grow respectively to accommodate the item in it. The binding would work only if the rendered item fits in the 7.5in space.

Since the report is data-driven, knowing the report layout, the sizes of the rendered sections and items, you can add additional "empty" data records to the data source on a trial-error basis. The new records will cause the report to render more section and move the desired section within the available space on the page (this space is determined by the report's PageSettings properties).

Regards,
Stef
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
Brian
Top achievements
Rank 1
Answers by
Stef
Telerik team
Brian
Top achievements
Rank 1
Share this question
or