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

Show a field in detail section once per page

5 Answers 69 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 27 Jan 2021, 10:15 PM

I have a report with one grouping. In the detail section of this grouping there can be so many rows that it can take multiple pages to show. In the detail section, I have one field being displayed on the far left that is returned from the database and i put in logic to only show this field once per group. Otherwise, it would show the exact same text for each row in the grouping. The problem comes in when the data carries over to a new page and there is nothing shown in this one column. I'd like to see the value that's shown on the first page, but with a (cont.) label next to it.

So the first page would have something like Breakfast and then the second page would have Breakfast (cont) on it. Any ideas on how to achieve this?

5 Answers, 1 is accepted

Sort by
0
Mads
Telerik team
answered on 01 Feb 2021, 04:55 PM

Hello Steven,

I have been trying to find a way to get the table-cell to repeat for the first row on a new page, but have not found any solutions.

There might be a possibility to set the data-source directly to the report, apply groupings, and then use group-headers to display that value on each page, but this will require a quite big restructuring of the report. I tried finding ways to achieve this, but it did not look exactly like the report you showed. This also depends on the structure of the data in your report. I see from the screenshots what looks like a calendar/scheduler. Is each row in the table a separate row in the data-source?

If you wish we can log a Feature-Request for this. It will be available in our Feedback Portal for other users to view and vote for. The more votes the item receives, the higher it will be prioritized.

Regards, Mads Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Steven
Top achievements
Rank 1
answered on 01 Feb 2021, 05:32 PM
Hi Mads, Thanks for looking into this for me. Yes, each row in the table is a separate row returned from the stored procedure data source. I added a conditional formatting expression in that first column to only show the value if it's the first record in the group, just so that it wouldn't repeat in every line.
0
Mads
Telerik team
answered on 04 Feb 2021, 02:11 PM

Hi Steven,

So I believe this approach can work for you, but as mentioned, it might require a considerable amount of work. I am sorry I could not find any better solution, but I will present what I found

The idea is to avoid using a table, and instead display each row of data in the detail-section of the report. By filling the detail-section with textboxes and making the height fit exactly to the height of the textboxes, the result will look like a table.

By doing this, we can apply the data-source directly to the report itself, then add one group to put all rows into groups similar to what you already have done in the table. The difference between groups applied to the report and groups applied to the table is that we have more control over the headers. A GroupHeader-section has a property called 'PrintOnEveryPage' that will help us include the group value for each page.

We use the GroupHeader-section to display the group-value and the headers for the table. This results in the headers repeating when a new group, which might not be desired, but I believe this is a compromise to be able to include the group-value. In the screenshot below you can see how the rendered result for such an approach can look.

The group value and table headers are inside the GroupHeader-section. The detail-section contains textboxes for each column and displays the rows. I have attached the TRDP report file with the example from above to this reply.

Let me know if it works out, if you run into challenges, or have any other questions.

Regards, Mads Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Steven
Top achievements
Rank 1
answered on 04 Feb 2021, 04:34 PM
Hi Mads, thanks again for the response and research. My report is actually structured the way you're talking about. I am not using a table object, just putting the data source fields directly in the detail section. I had also thought about creating a new group and just put my first column in that group level and set that section to print on every page and all of the other fields would remain in the detail section. I was just concerned about that empty space after the first field in the group section (like in your report example, the section in Blue where you have headers, mine would be blank). But it might be enough to satisfy the requirements. Thanks again!
0
Mads
Telerik team
answered on 09 Feb 2021, 01:01 PM

Hello Steven,

Thanks for the update. It is a bit unusual to have the headers repeat in this way, but I believe it might be the best option to make it look somewhat natural and complete the requirements. Take the time to test and let me know if there are any other questions I can help out with.

Regards, Mads Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Steven
Top achievements
Rank 1
Answers by
Mads
Telerik team
Steven
Top achievements
Rank 1
Share this question
or