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

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)

Related

Slide Up Visible Sub Reports in SSRS Report

I have an SSRS Report composed off datasets (tablixes) and subreports. How do I have the reports slide up when they are visible.
Report
A (NOT visible)
B (visible)
C (NOT visible)
D (NOT visible)
E (visible)
Visibility is set based on user input/parameters, etc. In the above example what will appear on screen is the tablix B / sub-report E. How I want it to appear is with out extra white space which it now has.
or in another scenario they could just pick E which is common and now we get a lot of white space at the top. What setting do I pick, what code can i write to have the visible rectangle of data slide up to the very top of available space.
So all we see is
Report
B
E
or
Report
E
When you've placed subreports on your page, did you make whitespaces between them? I belive you did. And now, when you hide one of subreport, whitespaces still visible and accumulate. You should reorganize your page by insert rectangles one below the other without (or minimum) whitespaces between of them. Put your subreports into each rectangle and add whitespaces inside it. Change expressions to control rectangles visibility instead subreports.
Don't forget: in spite of subreport is hidden, it is still retriving data and loads your server. To avoid it, pass visibility status to your subreports, to tell thems datasets to select null.
P.S. If you see extra white space in preview mode, it is not allways the same as browser will display. Especially if you hide object directly, without using expression.

RDLC report, How to combine the bottom of tablix with page footer

Help me please.
A Tablix has 7 rows but I need to increase height of tablix until it matches the footer.
What should I do?
[Edited.]
According to below figure, I tried to insert a lot of blank rows to a Tablix.
And I used an Expression for setting visibility each row.
Example :
-If Dataset has one record. One Blank row will hide.
-If Dataset has two records. Two Blank rows will hide.
But It is inflexible because some rows aren't a single Line.
Using RDLC 2005 you can simulate this behaviour with:
a Body section with Body.Height = Page.Height - Footer.Height - TopMargin - BottomMargin
a Tablix without border
a Rectangle for every column to simulate with Rectangle.Height = Body.Height; set its RepeatWith property to Tablix
In order to simplify some operations you could put your Total textbox in the Footer or consider it when you build your Body section as explained before.
There is an example of what I mean (Tablix with red border and Rectangle with black border):
Another, though more complicated way, of forcing the height would be to use Subreports for each of the columns.
Each Subreport would list the table contents for that column as a single list.
You could then force height of a single table row to reach the footer... If the Subreport does not require the entire space it will return whitespace
Parent Report
Report 5
Report 4
Results in the following output report

Empty page when hiding tablix

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.

SSRS hide white space from empty textbox outside of tablix

I'm new to both SSRS and development in general, and can't seem to find the answer to my problem. The report itself is simple-- a stored procedure collects responses and I display them using Lookup expressions in textboxes. Some fields are not required, so some of the textboxes are empty in my report. I would like to remove the white space left by the empty textbox.
In retrospect, I wish I had used a table to format the page, but since I have a very large number textboxes with expressions, I can't easily refactor my work. I found solutions for tablixes (Trying to Get Rid of White Space in SSRS Report), but nothing for free-standing text boxes.
Is this possible?
If you right click on the textbox and navigate to 'Textbox Properties...' you can toggle the visibility of the textbox, and if it is hidden you wont see the white box. You could also enter expressions, like the one below for example will hide the textbox if there is no data in it.
=iif(isnothing(reportitems!Textbox1.Value),false,true)

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.