Empty page when hiding tablix - reporting-services

I've got a number of tablixes and they hide/show expressions.
If we run the report for a particular dataset, the first tablix is shown on the first page and the data ends pretty much on the last line of the page.
The second tablix is hidden in this particular scenario but since I have left about 1cm gap between tablixes, this causes a new empty page to be created. Is there any way of removing this gap?

Move the tablix's closer together (basically remove as much whitespace as you can)
If you need more space when you are showing the tablix - add a row to the top of the tablix and set its visibility to false.
This is often caused by the feature of ssrs preserving whitespace around objects that are hidden

Check for the page breaks in the tablix properties. It may be there which is causing this.

Related

RDLC Report add line between white space and last page

I'm working on a "contract format-like" rdlc report, which will have four tablix with variable numbers of rows. This report also have a fixed "last page" that is set to do a page break "always".
What I want to achieve is to "span" some element to gave the impression that the remaining white space between penultimate/before last and last page won't be written/added with any more info in the future (as we use to do by handwriting/completing, in the past). The ideal object could be a transversal line (I think that's not possible in my research). Also I have found some workarounds that take in count the "number of rows" of each tablix and do and approximation height, then add the "needed" rows to the end of the last tablix but that's not quite the solution I'm looking for.
Please look the attached image for a better idea of the line desired location:
Explanation-Layout-And-Variable-Height-Meaning
I hope you can advise with your experience on this (even if not the solution some idea of how to achieve it).
Thanks in advance!
Unless I'm missing something....
If you wan to simply add a page break and then a 'blank' page...
Just add a rectangle under your last tablix.
Make it short vertically, (the width does not really matter as long as it's no wider than you tablix). Move it so it's close to the last tablix (say 5pt below)
Right-click the rectable and choose properties. Now set the properties of the rectangle to "Add a page break before"
This will force a page break after the last tablix and then push the empty rectangle onto the next page giving the impression that it is blank.

SSRS - Subreports leave blank white space if they have no info

I have several subreports that contain data that is either shown or hidden. This is how the design looks like:
As you can see, they are small but if one of the reports have no data, then the whitespace is still displayed when previewing the report:
I tested the subreports out by putting a solid black line as border and as you can see, the whitespace is generated even though the subreport returns no data.
How do I hide the whitespace?
You could nest the subreport in a rectangle and control the visibility of the rectangle based on if there are any rows returned.
=IIF(Fields!Field1.Value IS NOTHING,true,false)
You could show/hide Subreport based on Expression as
=IIF(RowNumber(Nothing)>0,False,True)

SSRS - RDLC Tablix Rows will not split across pages

I have a tablix with two columns of data (the section name and the section text). The section text has grown so large for some sections that the row representing the section takes up 2/3 or more of the page. THe report prints fine until on of these large rows would have to split over the end of a page and continue on the next page. In this case, and only in this case, the rows leaves large amounts of white space on current page and start on the next page (as if it had a page break before it)
I have already set the Tablix General Property "keep together on one page if possible" to true and all the other page break options for the tablix and row groups to false, to no avail.
Does anyone know of a trick or work around to make the large rows split over pages??
Setting Keep together on one page if possible to true/checked will cause SSRS to attempt to keep the row on one page, which means if the data spans across page breaks it will move that row to start on a new page so that it can be seen on one page, which would introduce white space where the row would be if the table was contiguous. So you need this setting set to False/Unchecked.
Next, ensure that the row group proeprty Keep together is set to False. This can't be accessed through the normal dialog box. If you don't have the properties pane showing in BIDS, then pressing F4 will bring this pane up. Select the row group(s), and ensure the property is appropriately set.
Also make sure that the text boxes inside the tablix are also set to KeepTogether=False. This will fix the problem.

First Textbox in Tablix cell defeats CanGrow of other Textboxes if it spans page break

I'm having a problem with the way SSRS handles long text in Textboxes inside a Tablix when the first Textbox is broken by a page break. Here's the simplified setup:
Create a Tablix with a single cell.
Add a Rectangle to that cell.
Add 2 Textboxes to that Rectangle, one below the other.
Ensure CanGrow = True for both Textboxes.
Add data to each Textbox such that each one contains multiple lines and the first contains enough lines to force some of it's lines past the end of the page. It helps to set the Page height to something ridiculous like 1 inch for testing purposes.
It's necessary to preview the report in Print Layout mode or export it to PDF to see that all the lines in the first Textbox print, but the second Textbox only prints the first line. Taking enough lines out of the first Textbox to avoid splitting it across a page will allow the second Textbox to print all of its lines.
Am I missing something? Is there a way to get the Tablix to behave properly across page breaks? It's the Tablix because moving the Rectangle and Textboxes outside of the Tablix fixes the problem. I don't see a CanGrow or similar property on the Rectangle or Tablix. A workaround is to put each Textbox into its own Tablix row, but that's not ideal in my situation.
I was able to reproduce the problem, but looks like there is an easy workaround:
If you nest a second rectangle in the first, and then nest the second text box within that rectangle, my pdf came out correctly. I tried this with BIDS 2008R2, 11x8.5 (landscape) pages.

SSRS giving a blank page at the end of report [duplicate]

This question already has answers here:
How to get rid of blank pages in PDF exported from SSRS
(16 answers)
Closed 5 years ago.
I am getting a blank page, at the end of my report in SSRS 2005.
I have a header logo and footer date values, and I have set the both to PrintOnLastPage = False, but I am still getting a blank last page.
Any ideas how to eliminate it? Thanks!
This solution applies for SSRS 2008 R2. I am not sure about earlier versions.
On Report Properties page, under category Other, set ConsumeContainerWhitespace to True.
Other suggestions still apply: Make sure your Paper Size can contain Report Width and Margins. Remove any white space you may have on your Report.
Good luck.
Shorten the width of the report, dragging the right vertical side to the left.
Setting ConsumeContainerWhitespace works, but may cause a catastrophic increase in report generation time, especially for very large reports.
An alternative solution is as follows and involves keeping track for yourself which record is the last record in your dataset.
SQL - Track Row Number vs. Total Rows
You may use a technique such as the above to track Current Row # vs. Total Rows, just make sure that your "Order By" mechanism matches that of your main select statement.
Add an end-of-record page-break to all but the last record
Add a vertically-tiny rectangle to the end of your report body
Rectangle Properties -> PageBreak -> BreakLocation -> End
Now, we want this rectangle to be visible when we desire a page break, and we want it to be hidden when we do not want a page break.
Thus, in the Rectanble Properties (right click) -> Visibility -> Show or hide based on an expression -> Expression Edit
=Fields!RowNumber.Value=Fields!TotalRows.Value
This will cause a page break to occur at the end of each record, except for the last record
I had a report that kept printing a second page.
Someone else had added the tablix and set a "Page Break" END property to the tablix.
When I changed this to NONE it solved the problem.
I had a report containing a subReport. The subreport had a 'PageBreak' property with the 'BreakLocation' set to 'Start'. Changing it back to 'None' removed the blank page I was getting.
Adding to what MikeGee had answered and considering this is a very old thread, I thought I would add my 2 cents.
To avoid blank pages, set each "BreakLocation" property of each tablix to "None". Sometimes it defaults to "End" and the number of blank pages depend on the number of tablix in your report.
For example if you have 3 tablix in your report and if each tablix has a "BreakLocation" property set to "End", you will have 3 blank pages.
set ConsumeContainerWhitespace to True if it is 2008 R2.
I had an image on the last page and when it's size was set to 210mm, 297mm (A4) it produced a blank page at the end of the report. But when I changed the height size from 297mm to 296.9mm the blank page disappeared. This was using VS2013.
Check your margins as explained above
+
If you have a tablix that dynamically adds columns to your report, check that the "runtime width" of you tablix is within your margins. At runtime, it may be larger than the body-width you specify in the designer.
(Note: it's impossible to do this with the designer; try reducing the size of your columns to see if the blank page disappear).