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

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.

Related

How do I force SSRS to break *in* a tablix row instead of between?

I am writing an SSRS report that contains a (nested) tablix. The last row of the inner tablix can contain a "large" chunk of text (say, between half a page to 3 pages typically).
With, say, half a page's worth of text in the last row, the report looks great on the Report Server, but when I render it as a PDF, a newline gets inserted before the last row. This puts that whole row/box on a page of its own.
What I want, instead, is for the row to remain attached to the rest of the tablix, and just render until it his the bottom of the page, and then do a newline and move on with the rest of the row.
Is this possible?
I was able to fix this issue myself. I clicked on the last row/cell in the tablix and disabled "Keep Together on One Page". This allowed it to split in the middle, so it didn't need to jump to the next page to stay together.

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)

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)

Labels in fields within an SSRS report

I am attempting to reproduce a form within SSRS and fill it with data. The original form has blocks with small labels inside of each box that identifies the entry requested.
I "thought" I could simply use two different tablixes: one for the blocks with borders and labels, and the other one with the actual datafields or expressions, and align the 2nd tablix directly over the first one so that it appears as though the fields are presenting data inside of the labeled boxes.
It looked as I wanted it in design view, but when I went to preview the report, it pushed the 2nd tablix below the first tablix, in effect creating two tablixes, one stacked on top of the other one (not displaying as how I intended).
So, how do I accomplish the form design in the manner that I am seeking?
You should be using a type other than tablix for your report. Use a 'List' instead and you can free float objects as you need them and also nest a tablix as well. A little explanation on list:
You can float images with text boxes and then even change syntax or draw boxes around them and decorate those.
The call out for a field in SSRS is [(value)] with the [] meaning: "Data Column in recognized Dataset"
You can call out Variables with an '#' in front of them [#Test] would be a variable a user would put in called 'Test'.
Whatever size 'List' element is will determine how large it is when it repeats. If you want a strict form ensure the length and width are set correctly on the properties of that element.
If you want it to break every page you can click on the 'List' > Right Click the top left corner > Properties > 'Add a page break before' checkbox.
My example shows a super simple textbox with a dataset that only has three ideas repeat as many times as there are id's, three times. You can apply this to your form as needed.
It looks like you could reproduce that form header quite easily with a single tablix. If you envisage the form as a set of tablix cells like so:
then all you need to do is set the Border properties for each cell to hide the borders as needed (or you could merge the cells e.g those for Applicant and Location).
You can use a tablix with only Header rows, deleting the detail row. If you need multiple forms per report, then put the tablix inside a List region.