Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force a textbox to split, rather than move to a second page in SSRS 2005 (PDF Export)?

This question is a follow up to my original question, I've done a bit more reseach, i narrowed a problem down quite a bit.

I've also uploaded a sample .rdl to illustrate the problem

I've got the following report setup: a header (image in the body), two textboxes, and a footer.

First textbox has a little bit of text, and second textbox has lots of text. Second textbox can fit on one page by itself, but won't fit on the page with my header and the first textbox.

The problem is that for some reason, the second textbox in the report is unaware of other contents of that same report, and as long as that one textbox fits on one page - it will be moved to the second page. (once the textbox grows larger than 1 page - it will split, and will achieve the desired behavior)

Desired behavior is to split the second textbox, and keep as much text on the first page as possible, and move the rest to the second page.

like image 317
roman m Avatar asked Dec 22 '22 09:12

roman m


2 Answers

I'm not sure about v.2005 but in v.2008 you can set a textbox property: KeepTogether to false.

This will fit as much text on the first page than the rest on the second page.

like image 190
Joanna Avatar answered May 13 '23 18:05

Joanna


This is pretty standard behaviour in SSRS. Like many issues with the Reporting engine, you have to trick it.

In this case you could try to provide the 'lines' for the second text box as individual rows in a Detail, then use a repeater or table to display them. Alternatively you could break on 'paragraph'. Unfortunately you'll have to do this in your data source, probably in a stored procedure, depending on how you're getting the data to the report.

If appropriate you could look at client-side reporting (.rdlc files), which allows you to pre-process the data in a .NET application, although setting up for printing can be more complex.

like image 30
Timothy Walters Avatar answered May 13 '23 20:05

Timothy Walters