SSRS - Adding empty cells under a tablix to fill empty spaces on the page (if any) - reporting-services

I work with ssrs with a dynamic row data in matrix/tablix. There is possibility when I have more than one page (say it two pages) where the data just fill half of the second page and leave a blank space below (half page blank space on the second page). How is the way to fill this blank space with empty rows? (whether rendering empty rows in the tablix, or inserting background image, or anything. I don't have any solution yet as it is dynamic data with many possibilities of the blank space size on the page)

Unfortunately there aren't any settings in the reporter that support this behavior. There are however several workarounds you could use to get the wanted result.
[1]
You could determine the amount of rows that fit on the first page and on the second page, just in case you have items above the
table on the first page. Before you send the datasource to the
reporter count the total rows and check if it exceeds the first page.
Then calculate the number of rows missing to fill an entire second
page (or third/fourth... if you ever get more data). Finally you add
empty rows/objects at the end of your datasource, which will of cource
cause the pages to be filled to the end.
As was pointed out before, this solution is only possible when working
with fixed row heights. If certain columns can have multi-line cells
then these could be checked as well and taken in account when
calculating the number of rows being displayed on the page. This makes
it slightly more complicated but is still a valid solution if you can
predict which columns might be troublesome.
[2]
A second solution would be to hide the table borders and place the table inside a rectangle that spans the maximum size of the
page. The borders of this rectangle can be used to display the table
outer borders and columns can be displayed by adding lines inside the
rectangle. This will cause the columns to fill the last page of the
report automatically. Unfortunately this isn't a solution to display
horizontal grid lines.
[3]
A third approach is adding an extra table directly below your table
with the same size of columns. Using the same method as from the first
solution you could fill the second table to represent the empty rows.
You'll probably have the same issue as with the first solution when
dealing with multi-line rows though.
I believe solution [1] and [3] will offer the most exact solution, if you're willing to do the math. If you don't want any horizontal lines then I suggest using approach [2].
Using an image to overlay the borders is of course another option but then you'll have the same issues when dealing with the multi-line rows. If you plan on working with fixed row heights, where you leave space for multi-line cells then this is becomes a valid approach but so does solutions [1] and [3].
Update:
If you only need the filled pages for printing you could make sure you add enough empty rows to fill at least the entire last page, these may go to a new page (1 new page, not 2... you can use a simple calculated guess for this) and exclude the last page when printing.

Related

SSRS - How to repeat entire first column on each new page for Matrix

How can I get the entire first row of a matrix column(aka Row Headers) to repeat when the columns of the matrix expand to new pages?
I've tried many solutions I've found online, but none of them have helped. I checked repeat row headers/column headers under Tablix Properties, under advanced > Row groups I set all static elements to Fixed Data/RepeatOnNewPage = True/KeepWithGroup = AFter. None of these have worked.
An example of the report setup/First column. https://imgur.com/a/oX8b6p0
I would expect the entire first column to repeat on additional pages when the number of columns spans more than 1 page.
Sometimes to get around the wonky-ness of SSRS, sometimes the best solution is an alternate solution.
If everything you are trying isn't working, you could always put labels in the page header that way it guaranteed repeats. However this solution isn't ideal because of the extra whitespace it creates in the header even if you hide the textboxes.

SSRS pre-printed form second page format issue

I've not come across anything like I am looking for so either I'm either not asking the right questions (for which I will apologize for re-asking a question) or it's not been asked.
I'm working on a report to print header information onto pre-printed carbon copy forms on a continuous form feed impact printer. The form is two pages and the header for the second page only contains part of the information that the header on the first page has.
I have the first page header working fine. I played with using rectangles and it was printing on target on every other page. The problem comes in when I try to print the page two header.
The way I am formatting the headers is that I have a single cell tablix with a rectangle in the cell. I've measured out where the 11 fields belong for page one of the form and placed them on the form. This all works correctly. Below that, I've inserted a second rectangle with the add page break before property checked. In that rectangle I have two of the fields that are repeated one just above the other (field 1 and field 2). Field 1 is in exactly the same spot as it is on page one. Field 2 is higher and to the left of where it is positioned on page one. The report body has no margins. Positioning is all done directly through the elements themselves. Field 1 sits about 1/16 to 1/8 inch lower than it does on page 1 even when position top is set to 0 (and there is no page margin). I can position field 2 exactly where I want it to be however. If I have multiple forms print out, all the page ones are perfect and page 2 field 2 is spot on but page 2 field 1 is always too low.
I tried separating the rectangles but was unable to connect the dataset to the second rectangle.
Is there a better way to do this? Is there a setting I'm missing that is adding padding to the second rectangle? Any help is appreciated.
Not quite the answer that I was looking for but it nearly fixed the problem. It turns out that the field itself had padding on it. I'm not sure how as I copied and pasted it from the first page but it moved it up to a acceptable position. It is still a bit low but close enough that the requester is happy with it.

How can I make a simple flow chart in SSRS?

I come to you with a question on how I can create a simple flow chart like in the pictures below in SSRS. I have a query that returns rows with events, and a date column that I can use to organize these events in chronological order.
I have it all basically set up but I am running into a design problem. I have a tablix with two columns in a group for the box+arrow combination, with column visibility set up to hide the arrow if it reaches the last event. What I would like to happen is for the boxes to reach the end of the page (the rightmost side of the page, and then come down a short distance below that row of boxes and continue on the same page (Ex. B). What it's doing is reaching the end of the side of the page, and breaking to the next page, effectively creating a bunch of pages with only one row of boxes on each page. (Ex. A)
Ex. A: What it does:
Ex. B: What I want it to do (accidentally forgot to include the arrow on the middle rightmost box in the picture, the second and third rows are just continuations of the first obviously):
I would almost call it row wrapping but it's not exactly the same. To bring the problem away from my specific flow chart design, I want to make tablix columns wrap down directly below the table (not the content inside the columns, the actual columns themselves).
I've done some reading on column groupings and interactive page size. I don't really understand the column grouping manipulation, especially when trying to apply it to my situation, and the interactive page size doesn't seem to be what I am looking for either. Any help on this would be really appreciated!
I suggest you use a multi-column layout, e.g.
http://nederveld.wordpress.com/2010/02/15/how-to-do-a-column-layout-in-sql-reporting-services/
Each of your Box + Arrow pairs would go into each cell.
I'm a bit confused about your arrow requirement, you might need to use an expression based on RowNumber to hide the arrow in the last column.

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.

Dealing with very tall textboxes and pagination in SSRS 2005

I have a report in SQL Server Reporting Services 2005. It makes use of a page header and footer and has no subreports. The body portion contains a few smaller elements and then a simple single column table. The table has a single header row and a single detail row. The header is just a label, basically. The detail row is a single textbox with a simple Fields!FieldName.Value as its output.
The problem is that FieldName, in this case, is a highly variable length string. It can be a sentence up to 8000 characters (usually no more than 2 pages worth). The text can contain line/paragraph breaks (returns) but no other special formatting. Everything is fine so long as the content fits on one page. Once the text exceeds a single page (8.5x11), the text is very nastily cut off abruptly. Since this is a pagination problem, it is only visible when exporting to PDF or when viewing the report in Print Layout.
It seems as though there is a maximum size the row can grow to on the first page and then it chops it off and starts it up on the second. But this cutoff is not carefully managed in relation to the text. It can occur right in the middle of a line, causing it to show the top halves of the letters on the first page and the bottom halves at the top of the second page.
Obviously, this is unacceptable, as it looks very unprofessional and can impair the readability of the line that was so messily split. I also can never be sure it'll split badly, as sometimes it more or less ends the page evenly, though usually I can still see the hanging tails of certain letters on the next page (g and p for instance).
The secondary problem is that I'd really like the table row header to repeat on each page. Setting the obvious property, "RepeatOnNewPage" has no effect. I suspect this is because it's still trying to show the single really vertically tall row. It seems like it's okay repeating headers and splitting pages nicely between detail rows. But because this is basically just a big block of text, and thus just one really tall row, it doesn't split it nicely.
What can I do or use to solve this problem? I can live without the repeating header so long as it just doesn't cut off text in the middle of a line.
Unfortunately, page break fine tuning is one of the biggest weak points of SSRS.
I can only suggest that you break up the long text into multiple rows before SSRS ever gets it. You'd want to parse the text to look for word breaks. The result will be odd looking breaks in the output since you won't know where the break will come on a line in the printed report. However, it'd be much more readable than cutting text in half.
If the text is comprised of reasonably sized paragraphs, you could parse it out that way instead.
You might even go so far as to measure the text using SQLCLR and the System.Drawing.Graphics.MeasureString method to fine tune the output but I wouldn't recommend that route for the feint of heart.
In SSRS 2008 R2 and Visual Studio 2008:
Click (not-right click) a textbox and go to the properties window (lower right side of VS) -> KeepTogether = false.
The text will cleanly cut between a line and continue on the next page.
Just thought to add here as searching for this doesn't return many results.
I have done what JC has suggested in the past where I've broken down the text into paragraphs and each paragraph would in effect be its own row. Works pretty well given the limitations of SSRS.
One thing to be careful about is that you would need to make sure that your paragraphs sort properly. In most cases it would display them in the correct order, but adding in a column with sortID to give some sorting hints to the table would probably be a good idea.
In the end, the cut-off-text problem was due to non-standard padding on the textbox in question.
For whatever reason, having padding any greater than the defaults (2pt all around) seemed to cause its pagination to go sour. I imagine it is due to the algorithm not taking padding into consideration when deciding where to break the paragraph. With default padding, the line always ends cleanly and nicely on each page.
As a workaround (since I liked the extra white space the padding gave to the layout), I used a rectangle to achieve the border and made the textbox inside it smaller than the rectangle by about an eighth of an inch. This gave the box some inner padding while still apparently allowing the pagination to correctly determine when to break up lines.
Still, a lot of unnecessary headache.