Why last rows are printed in the middle of the page if there's a lot of empty space? - reporting-services

I'm developing this report:
The problem I'm facing when printing a document with multiple lines is that rows are not printing together when there is a lot of space for it:
Header properties:
Footer properties:
I don't know why it's not printing on top of the 2nd page header and it leaves a huge blank space... there is also enough space in the 1st page to print all rows
Report property ConsumeContainerWhitespace is set as True
How can I use all that empty space with the rows instead of printing blank?

The header and footer are fixed spaces. This means that even if you hide the content on one or more pages, the space will still be reserved on layout.
The result is that the space available for the lines is limited on each page and the render engine needs to split them to multiple pages.
You can solve the issue with the header by moving it to at header row in the tablix.
The footer is not possible to do any different if the placement at the bottom of the page is a requirement.

Related

SSRS - Dynamically shrink header

I need to shrink dynamically height of header on ssrs
I have found answer on: How to dynamically increase the page Header height in SSRS 2008 , but still I have problems as follows.
I have SSRS with several text boxes, (10 lines), and I want to show only one line for page 2 and after, and for page 1 - all of the lines.
I cannot shrink the size, because minimum size of header by default is the maximum element bottom position.
Can I control the size of height of the header dynamically?
Thanks :)
Page header and footers can not be dynamically sized. This allows support for more output devices but limits its use for many situations. A common work around is to use a Parent group above all others in your dataset that has a sql command that returns 1 row such as SELECT OneRow=1. You could place your header logic in this print once groups header and optionally show or hide the header based on first page last page etc.

SSRS hidden column creates extra blank page

I have a report with a Tablix where I would like it almost full page width. "Gross Pay" is visible or not based on a parameter. I have also added a blank column to the left of this which has the opposite visibility to "Gross Pay" as a work around for the fact that I can't resize tablix width dynamically so the whole tablix stays the same width.
This is all fine and works but spits out an extra page when saving to pdf. This is because my body width is greater than 21cm. Below is the tablix, the red line is where page end is.
My body width must be 24cm in the designer to accommodate this hidden field but will always display under 21cm in the end. Can I have a body width in the designer larger than the page size? Alternate solutions would also be appreciated.
Thanks!
I ended up removing the blank column and just using expressions for all fields on the "Gross Pay" column that would fill it as blank if appropriate parameter was set.

Repeat a vertical line on every page in Report Builder / SSRS

I wish to include a vertical line on every page of my report, which runs from the top to bottom of the report body. How can I achieve this?
I've tried using RepeatWith, but it doesn't seem to work, the line appears only on the first page.
Thanks
Is this for look and feel purposes only?
I would create an image with such line and use it as the body background. Or if you're using a tablix that spans across multiple pages, another idea would be to create an empty column on the tablix with a border on the left side.
And yet another idea would be to use a rectangle with a left/right border and place all your tablixes inside the rectangle as this would make the rectangle to be expanded to multiple pages keeping the border (the vertical line) on your report.
I don't think that you can tell SSRS to automatically repeat lines on multiple pages.
I've figured out a way to solve that problem (without using RepeatWith, RepeatOnNewPage or Report Background Image)
I wrote a simple code to add blank rows to the table in the body. The number of rows to be added will be determined by the body height and the height of a row.
For example, if the body height is 6" and height of a row is 0.5" then a total of 12 rows can be fitted into one page. So if your table has 4 rows then add 8 extra black rows so as to make the table height equal to the report body.
If the number of rows is more than 12, say 15, then you'll add [12 - (15 mod 12)] rows
, i.e. 9 blank rows.
And you can have side borders on any of the columns as required, resulting in a vertical line running throughout the page.

Dynamically placing empty space

I have some dynamic content which covers up to 3 page and I want to display in a specific format. For that I need to place a empty divs in bottom of each page to cover up remaining spaces and start my remaining content from new page always. This pages later converted in to a pdf page.
My issue is I don't how many blank space I need to insert in all cases, since the content size change always. Is there a way to dynamically see how much space is left from page bottom and print blank spaces ?
Thanks
Instead of manually adding spaces to your document, you should use the page-break-before, page-break-after, or page-break-inside CSS rules to tell the user agent how it should break up pages.
See here: http://www.w3.org/TR/CSS2/page.html#page-breaks

Web page stretches in width when data is entered without new line character

I have a webpage with tabular structure with width of table 800px.
I am fetching some data from DB and displaying it on page,
but when the length of the content goes behind this 800px the page gets stretched beyond 800px.
According to me the width should noy increase from 800px and the extra characters should go to next line.
Please have a look on these two pages to understand the exact situation:
Link 1
Link 2
The page uses the pre element, which means preformatted text, i.e. line breaks shall appear in the display exactly as in the source and no new line breaks shall be added by the browser. The fix depends on how you wish the content to appear.
Normally you should use e.g. div element instead and add markup that creates forced line breaks or empty lines as needed, e.g. simply (and simplistically) <br> for forced break.