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

Keeping ReportItems together on one page

8 Answers 1495 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rehan
Top achievements
Rank 1
Rehan asked on 04 Mar 2015, 04:11 PM
I have a report with the following ReportItem's in it:

PageHeaderSection
DetailSection
    Panel
        TextBox - The title of the section
        Table - The section data
    Panel
        TextBox - The title of the section
        Table - The section data
    Panel
        TextBox - The title of the section
        Table - The section data
    Panel
        TextBox - The title of the section
        Table - The section data
PageFooterSection

I want each TextBox and Table to show together on one page. If the table data spans exactly one page, the TextBox shows on one page and the Table shows on another. How can I keep both of them together?

8 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 09 Mar 2015, 12:47 PM
Hello Rehan,

Set Panel.KeepTogether = True and Table.KeepTogether = False. The KeepTogether property determines whether the report item or section will be kept together on a single page or will span across multiple pages. More information on this behavior can be found in the Understanding Pagination help article.

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.

 
0
Mike
Top achievements
Rank 1
answered on 29 Jan 2019, 05:46 PM

I have the same issue, but with a bit of a twist.  I have a panel with a TextBox which contains the header for the section followed by 4 tables all inside a single panel.  While I don't need them all to display on the same page (Panel.KeepTogether = True), I don't want the TextBox with the header to display at the bottom of a page without at least one of the tables.  I had considered adding the section header as a header to the first table, but any one of these tables may not display if there is no data, so if the first table had no data, it could still be left alone at the bottom of a page.

Panel

TextBox - The title of the section
Table
Table
Table
Table

 

0
Nasko
Telerik team
answered on 30 Jan 2019, 01:53 PM
Hello Mike,

The text box contains the header for a section. It might work if you set a page break before this section so that it always starts on a new page. Then the text box will always be on the top of the page followed by the tables.

Regards,
Nasko
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Mike
Top achievements
Rank 1
answered on 30 Jan 2019, 01:58 PM

This report is intended to read like a continuous document, so a page break before the section heading is not ideal.  I had suggested this and it was not met with an enthusiastic response.  Any other suggestions?

Mike

0
Nasko
Telerik team
answered on 04 Feb 2019, 01:02 PM
Hi Mike,

There is a more complex approach which utilizes Bindings to move the table items in case the first table or any other subsequent table is not visible (has no data). Each table is nested inside a separate Panel item together with the section title text box. The hierarchy of the attached sample report (demonstrates two tables) looks like this:

Panel
Panel
Title Text Box
Table 1
Table 2


Each panel item has its height set to a very small number via bindings, so that it does not take up unnecessary space in the report.

To open the attached report you will need the latest version of the Telerik standalone report designer.

Regards,
Nasko
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Mike
Top achievements
Rank 1
answered on 06 Feb 2019, 04:24 PM

Nasko,

I have altered your sample a bit by adding a third row to the second table and setting that tables KeepTogether property to false.  I would want the header textbox to appear on the same page as a portion of the second table when hiding the first table, but that is not the case.  In this scenario, the header appears on page one with the table spread over pages two and three. 

I have the altered report zipped up, but I cannot attach it to my response.  Is there another way I can get it to you?

Mike

0
Nasko
Telerik team
answered on 07 Feb 2019, 01:14 PM
Hello Mike,

To attach files you need to open a support ticket. I noticed you already have an open support thread on the topic, so you can attach files there.

Regards,
Nasko
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Mike
Top achievements
Rank 1
answered on 07 Feb 2019, 01:17 PM

Nasko,

I attached the reworked report sample to that support ticket yesterday if you would like to have a look at it.

Mike

Tags
General Discussions
Asked by
Rehan
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Mike
Top achievements
Rank 1
Share this question
or