How to place elements at the bottom of a specific page?

1 Answer 28 Views
General Discussions
Erik
Top achievements
Rank 1
Erik asked on 06 Feb 2024, 04:06 PM
Hi, I need to create a report that contains a list component. In this list I added some header information and then a table with binding data. After the table there are various textboxes. After these I have a panel which is basically my second page with static data. The first page may grow due to the table.
I need the textboxes after the table to always go to the bottom of the page. Is this possible?
I already tried with Report Book separating first part and panel with static part, but it can't alternate reports.
Maybe with PageFooter? In this case I don't know how to conditionally show it only after the first part and hide after panel with static page.

1 Answer, 1 is accepted

Sort by
1
Accepted
Momchil
Telerik team
answered on 09 Feb 2024, 10:03 AM

Hello Erik,

Without taking a look at the report definition, it is difficult to suggest a concrete solution but here is an alternative that may work for you.

1. Remove the List and assign the data source directly to the report.

2. Add a static report group to the report.

3. Move the header information and table to the group header section that was created with the report group.

4. Place the various textboxes in the group footer section that was created with the report group and set its PrintAtBottom property to True.

5. Add a report footer section to the report, set its PageBreak property to Before, and place the static data there.

For your convenience, I am attaching a sample report that illustrates this.

If the above does not work for you, you can share your report and I will try to suggest something suitable.

Best Regards,
Momchil
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Erik
Top achievements
Rank 1
commented on 12 Feb 2024, 02:20 PM | edited

Hi! The solution you proposed does almost what I want. I attach a simple version of my report and its version made following your example. Both already have a JSON with the data set up to display a preview.As you can see, I need to use a List to repeat the contents of the report multiple times. I hope it can help you understand the final result I would like.


Thank you,
Erik

Momchil
Telerik team
commented on 13 Feb 2024, 12:55 PM

Hello Erik,

Thank you for the sample report.

You can repeat an instance of the report for every data record by moving the data to a parent report, referencing the existing report in its detail section using a SubReport Report Item, and binding the subreport's data source to the parent data object.

See the attached reports, for reference.

Erik
Top achievements
Rank 1
commented on 14 Feb 2024, 03:50 PM

Hi, I tried your example but it seems there is an errore:

Reports are in the same folder. Maybe the problem is on my version of Telerik Reporting? Currently I use 16.1.22.622.

Momchil
Telerik team
commented on 19 Feb 2024, 11:50 AM

Hi Erik,

Apologies for the oversight.

Indeed, the reports rely on the SubReport.DataSource property that was introduced with the R3 2022 SP1 (16.2.22.1109) release but they can be modified to work with earlier Reporting versions using the alternative approach described in the How to bind Sub Report to Main Report's Data KB article.

To implement the above, I have moved the data binding from the main report (MyReport_BasedOnDemo_Main.trdp) to the subreport (MyReport_BasedOnDemo.trdp).

I am attaching the updated report definitions to this message. Please, give them a try and let me know if they work as expected now.

Erik
Top achievements
Rank 1
commented on 19 Feb 2024, 04:24 PM

Thank you! Now it works perfectly!
Tags
General Discussions
Asked by
Erik
Top achievements
Rank 1
Answers by
Momchil
Telerik team
Share this question
or