How to keep List contents on the first page? (SSRS 2005 - PDF Export)

与世无争的帅哥 提交于 2019-12-24 19:20:00

问题


I've got the following report setup:

1. Letterhead (not in the header, since i only want it on the first page)

2. List control with some data

when i export the report to PDF, and the contents of the List are less that one full page - my letterhead is displayed on the first page (the rest of the page is empty) and the List content gets moved to the second page.

if the List grows over 1 page - reports is showing up just fine (Letterhead and portion of the list on the first page - the rest on the second page)

It looks like it tries to keep the list on 1 page as long as its contents fit on the page - but when you add the letterhead to the contents it overflows the page, and the list gets bumped down to the next page.

Is there any way to keep the list on the first page regardless of its size.

Putting the letterhead in the list is my last resort, I'd like to hear some other solutions.

uploaded a sample .rdl to illustrate the problem

got rid of the list for simplicity, the problem seems to be with a textbox wanting to show up on 1 page


p.s. see this question for more details


回答1:


What is the source of your text? Is it coming from a dataset? If so, Add a paragraph id in it, set your table to group on the paragraph id and show only the group header. In the group, add a bottom padding value of say 5. The table will handle the paragraph breaks for you, and if it grows more the a page it will handle it for you. Make sure that keep together is set to false. The paragraph id will be used to sort the dataset by id ascending.


sorry I didn't notice your comment at the end. The only other thing that i can think of is to shift your list up closer to the header and eliminate all empty space at the end. Also, make sure the KeepTogether option in the list is set to false. This way it will break up your list rather than move it to the next page.


you can put both the letterhead and the list inside a rectangle so they are always grouped together.

Reporting services also tries to keep the relative spaces you have in the designer, so if you list is aligned to the bottom of the page and there is a space form the header; it will keep the space on top and align everything to the bottom of the page.



来源:https://stackoverflow.com/questions/1345853/how-to-keep-list-contents-on-the-first-page-ssrs-2005-pdf-export

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!