We have a report with a List on it, bound to a collection of records, and grouped by a date field with a Row Group. There is a header row for each group of records, which is a TextBox with the date in it. When rendering to a PDF, everything works fine but the group header row textbox extends to the second page, even though it is well within the bounds of the page. Any suggestions?
15 Answers, 1 is accepted
I am not sure about the report structure you have. Based on the provided information, my suggestion is that the report is wider than the page. Check report's PageSettings -> Paper Kind and Margins properties size to match(or to be higher than) the width of the report. The second page might be not blank, but with some content that cannot fit on the current page and is carried over to the next page.
If you want to see which item is out of the boundaries of the page, consider following KB article example - Problem: Telerik Reporting renders blank pages. Set the items background to a different color and run the report in print-preview mode, or export it to PDF. The rendered report will give you a clue about the item, which is too wide. Then try to make it smaller until it fit to one physical page.
If the issue still persist, attach a screen shot with the report definition in the designer so we can see the report's structure.
Regards,
Silviya
Progress Telerik
Thank you for your reply. We tried adjust margins and page size but the list's grouped header that wraps. Hopefully we're not going about it the wrong way (basically trying to group the data by date). A screenshot is attached, and here is a sample project that demonstrates the issue:
https://www.dropbox.com/s/y59u2ls65h58z4v/ReportSample.zip?dl=0
I notice that the version that you are using is Q3 2013/7.2.13.1016 which is old. Our recommendation is to upgrade to the latest version of the product Telerik Reporting R1 2018 SP1 to be able to use the latest improvements and bug fixes.
In the provided report there are some overflowing items. As a general rule of thumb, you should never have a yellow warning triangle in a report design, since this can lead to unexpected results during rendering. For more information, refer to Design Considerations for Report Item Layout help article.
However, my suggestion for this scenario is using the following Report Structure:
1. After creating the DataSource, include it to the Report.
2. Add new GroupHeader Section including the two TextBox items - "ID" and "Description". This group header might be static one.
3. Add new GroupHeader Section including the TextBox with the formatted date. This group should be dynamic group with Grouping like for example: =Fields.Date
More about the types of grouping - please refer to Grouping data help article.
4. In the Detail Section add two TextBox items for Fields.ID and Fields.Description. They will be rendered once for every row in the data source.
I am attaching sample report definition created with Visual Studio Report Designer. You should run Upgrade Wizard in order to upgrade Telerik Reporting projects to a newer (or older) version of Telerik Reporting.
Regards,
Silviya
Progress Telerik
Thanks for the prompt reply. We are actually using the latest version and the issue is still there (looks like when we removed the reporting dll to prepare it to upload, the reference somehow got changed). Regarding the yellow warning triangle, that was just in the sample and not in our main report, but resolving that still doesn't fix the wrapping.
We'll try the structure you suggested, but is there something wrong with the List approach? We have many other elements on the report other than what was in the sample. It seems like that grouped header row is not rendering properly. Can you confirm whether we are using it correctly, or is it a bug?
As for the latest version, we are not aware of that kind of layout rendering issues with the List data item. Based on the provided information, the issue seems to be caused by the width of the report exceeding the boundaries of the physical page - Problem: Telerik Reporting renders blank pages.
Regards,
Silviya
Progress Telerik
In the provided report definition, report width is larger than the width of the physical page. You can check the attached screen shot for reference. This will cause a yellow triangle to appear in the left top corner of the report.
This is a warning for the report author that the report will occupy additional pages when paged as its boundaries are larger than the boundaries of the page.
To avoid the blank pages, you can test the following:
1. reduce the width of the report and inner items
2. increase the width of the page in report's PageSettings
3. reduce page margins in report's PageSettings
4. change page orientation to Landscape in report's PageSettings
Regards,
Silviya
Progress Telerik
I am not sure why the header spans to the next page with the current report structure. We will need sample project with test data (for example add some CSV data as a plain text) that reproduces the strange behavior to make more concrete suggestions.
The sample report attached earlier do not have any test data and we cannot reproduce the expanded date field, see the attached image that shows what I see in print preview.
Regards,
Silviya
Progress Telerik
I took the time testing the project once again. Feel free to check the attached files (both screen shots with the current report structure and output PDF file) with the steps I'm taking in order to fix the layout problem.
So, the brief description:
1. The InitialOpeningOfTheProject.png and initialOutput.pdf files contain the state of the project when I first open and run.
2. The AfterShrinking.png and outputAfterShrinking.pdf files contain the expected behavior when the List item is shrinked to fit the report width. But I noticed that the right border of the TextBox for the description is missing, so I took the last step to include it.
3. The FixedBorder.png and FinalOutput.pdf files contain the normal behavior of the exported report.
From your answer on 09-Feb-2018, I noticed that there is a difference between the design-time report and the output PDF file. Please run the project again with the already shrinked List item.
Regards,
Silviya
Progress Telerik
Hi,
I'm using crosstab to display list of images. When there are more images, it goes to the next page. Instead I would like to display few in first row and then few in second row below it so all images are displayed in the same page.
I have attached a sample rendered report where the images are spanned across 4 pages and also a screenshot for datasource.
Please suggest me an option.
Thanks
Vas
Please check this article for more information and a demo:
https://www.telerik.com/support/kb/reporting/details/how-to-create-multi-column-report---across-the-page-and-then-down
Best Regards,
Silviya
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).