Needing to Display Multiple Rows Per Page in SSRS - sql-server-2014

I've got a report that I would like to display the first three rows on all pages of the report. I have got the first row repeating on each page, but I am having trouble with the second and third rows - they will not repeat for some reason.
Here is where I have gone into the Advanced Mode and selected the Static grouping for the first cell in the first row:
And in the Properties windows, I have selected KeepWithGroup = After and RepeatOnNewPage = True.
When I run the report, the top line appears on each page of the report.
I would also like the second and third lines to repeat, so I did the same thing for each of these rows. In the Advanced Mode, I selected the Static grouping for each of the rows and changed the KeepWithGroup = After and RepeatOnNewPage = True.
Since I am doing some grouping on the report, I tried two different static groups to get it working, one in the TWRA Number cell and one in the First Name cell.
And finally, I wanted the row with the headers for Date, License Type, License Description, etc. to repeat so I selected the Static grouping for the third line and it highlighted the first cell in the row and I made the Advanced Mode properties changes there:
I've tried different variations for KeepWithGroup to be After or Before, but nothing will make the second and third lines repeat.
Any suggestions on what I am doing wrong here?

Right mouse click TWRANumber field, Insert Row - Inside Group Above, Cut and paste the first row onto the new second row.
Delete the old first row.
This should help you.

Related

Hiding a row if text box is hidden

I have a report that lists parts required for a job, and then within each part it has rows that show locations and quantities of parts on-hand. The main list has a header (part number, description, quantity) which is only shown once at the top because it is not within the grouping. However, the second header (on-hand quantity, location) is within the grouping so it repeats. I would like it to only show once.
I have tried using the hide duplicates property for the header text boxes, but this still leaves blank rows. I have also tried setting the row visibility using a comparison between ReportItem!lblOnHand.Value and Previous(ReportItem!lblOnHand.Value) but this gives me an aggregate error.
This is what the report is displaying now:
You need to set the row visibility rather than the individual text boxes. Right-click the row header to access the setting..
You should (untested) be able to use the same logic as you have now. If this does not work then you will need to test if the group is the first group and use that in the expression, something like...
=Fields!Partnumber.Value <> FIRST(Fields!Partnumber.Value, "myGroupOrDatasetNameHere")
The above would hide thew row if the part number in the current context is not the same as the first part number in the group or dataset name specified.

SSRS: Position Matrix Cell at Intermediate Column Grouping Level, and also inside a Row Group

I have an SSRS matrix that has one level of row groups and two levels of column groups. I have a textbox that is positioned inside one of the column groups, and outside of the other one, which is what I want. But I also want this textbox to be positioned inside of a row group.
Basically, I would like #1 in the screenshot below to have a row group associated with it so that #2 is inside that row group.
My goal is to conditionally set the row-visibility for the first row. But "row visibility..." is greyed out. As far as I can tell, the way to get the option is to make sure it's inside of a row group.
The reason I want to set visibility is because the user has the option to show or hide charts, and separately to show or hide data. If the user selects both charts and data, then I don't need the first row because the label for the data can describe the chart as well. But if the user only selects charts, then I need that first row.
If there's another approach outside of minimizing the row height, I'm all ears.
Though I'm still interested in whether this puzzle is even solvable, and if not, why not.
Steps to Repeat
A version of this problem can be repeated as follows:
Insert a new matrix in a report
Just fill in dummy values, such as a blank space, into the "RowGroup1" and "ColumnGroup" "Group On" expressions.
Add a parent group to the column group, and similarly just give it a dummy grouping expression.
Delete the second row of the matrix, via "Delete Rows Only"
You now have a matrix with the same problem. Namely, get the second cell of the first row, to be inside of a row grouping.

Combining Cells in Locally Rendered Microsoft Report

I have a basic Tablix in my report that currently renders as follows:
These are steps in a manufacturing process with the clock number of the person who performed them with date performed in the last two columns. However, sometimes steps are combined and performed together. In the example above, steps 10-20 are performed together, and 30-40 are performed together. So I would really like the report to be rendered like this:
I do have a column in my data called "StepRange" which in the above example would be "10-20" for the first two rows and "30-40" for the third and fourth rows. So when the value of StepRange is alike, I know those rows are performed together and henceforth the last two columns should be combined. My example shows only two rows being combined at a time, but it could be any number.
How can I make my report look like the second example above instead of the first?
Single Tablix Method
Rather than literal conditional merging, you can set the border style of a textbox using an expression to achieve a similar effect. There are a few steps, but none of them are particularly involved.
Create a parent group for StepRange. Do not add a header or footer, and delete the added column without removing the group.
Make sure that your properties panel is visible on the right of your screen. If not, check the "Properties" checkbox under the View ribbon.
Click on your first detail TextBox and expand the "BorderStyle" property. Set the "Top" property to the following expression:
=IIF(RunningValue(Field!Step.Value,CountDistinct,"StepRange")>1, "None", "Solid")
Set the Bottom property to "None".
Set the expression of the detail TextBox itself.
Replace FIELDNAME with the appropriate field:
=IIF(RunningValue(Field!Step.Value,CountDistinct,"StepRange")>1, "", Field!FIELDNAME.Value)
Repeat this process for each detail TextBox.
You may need to create a dummy row at the bottom with a black top border if you do not have a summation row. (optional)
The expression only evaluates to "Solid" for the first Step value within each StepRange group, so subsequent rows do not have a top border and appear undivided.
Nested Tablix Method
Using a nested Tablix is more straightforward. I have had some issues with them, including some rendering hiccups. But in a report this simple that may not be an issue at all.
Set up your main Tablix to group on StepRange.
Either clear or add a column to the left for the individual steps.
Select "Insert Table" from the toolbar and click on the empty cell.
Set the cells to your step and operation fields and delete the extra column.
The result should look roughly like this:
By default the inner Tablix will be detail grouped. If your detail rows are more granular than the "Step" field, go to the properties of the "(Detail)" group and add a Group Expression for Step.
You can also delete the inner header row if you don't want to see it repeated in the report.
This results in the employee fields actually being merged and spacing properly. If you don't use an aggregate function on those fields, their value will be that of the first row returned internally. Which is moot if their values are uniform across steps.

RDLC : No page break - four sub reports within table/tablix

I have a situation where i have to display four reports based on checkboxes. So user can select different combination from four reports.
My problem is page breaks. I have tried different options (see below) from which two options (option 1 and 2) does not give page breaks at all whether option 3 gives page breaks for each tablix regardless of you do not want to see that report. Report is giving empty page for each tablix no matter there is no data in that tablix to be displayed.
With option 3 if i select all reports to show then everything is perfect.
I have tried these options
Option 1 (page break does not work)
Main Tablix -> each row : all subreports within rectangle within each row of tablix
option 2 (page break does not work)
Main Tablix -> each row -> Another tablix with group by ID within each row of tablix and then subreport inside each tablix. And I applied page break end on each tablix.
option 3 (page break works but gives empty page for non selected reports)
A List group by ID -> within a single row of this list I have places four tablix group by ID for each subreport.
Option 3 works but gives empty page break for those reports which are not selected. For example from Four reports if you select last two reports to display then you will get two empty pages in the beginning of report and third report on third and fourth report on fourth page which is correct. I have tried hiding tablix using table hidden and group properties hidden but still getting page breaks.
Any help will be much appreciated.
I have resolved this issue. For those who are struggling with same kind of situation, here is my work around.
I placed one list box and then four tables in a row and i placed subreports within these tables. i didn't apply any page break here. I am only showing and hiding tables based on report selection here.
Trick is within subreports.
As there were lots of tables and groupings in each report so i placed one table at the end of the each subreport.
This table should only have one cell. I removed header and 2 extra columns which were not required. Select dataset for this table. I did not want to pass dummy empty dataset so I selected my dataset but I created grouping on a parameter which I was passing from parent report and it has value 1. So now this table will only display 1 empty row. Reduce the height of the table. Plus I removed the border of textbox inside the cell. I checked 'Page break at end' option. In the Hidden expression I used following code which checks if there is any report which is visible after this (current) report. If yes then do not hide this table mean you want page break otherwise hide it mean no page break.
=iif(Parameters!AddReport_2.Value,false
,iif(Parameters!AddReport_3.Value,false
,iif(Parameters!AddReport_4.Value,false
,true)))
This solution works for me.
I would love to hear for a better solution.

Report group headings not repeating on every page

I have an RDLC report with three tables and associated data sets. In my second table, I cannot get the two 'header' rows to repeat on each printed page. When viewed interactively, each table is on its own page and this isn't a problem. When I switch to print layout, e.g. my second table now spans two pages, and the second page gets no header rows.
Am I missing a setting or something?
ADDED: I do have the 'Repeat Header columns on each page' checked.
http://vbcity.com/blogs/xtab/archive/2010/06/14/what-to-do-when-the-repeatcolumnheaders-property-in-a-tablix-isn-t-working.aspx
That should help you out for getting them to repeat. (some of the time)
I still have an issue where I set the hidden value to an expression for the next group header that some of the time it won't render my group header on the next page. Very annoying. If someone knows of a fix for this please let me know.
Copied from Microsoft Technet Article. Helped me:
To display a static tablix member (row or column) on multiple pages.
On the design surface, click the row or column handle of the tablix data region to select it. The Grouping pane displays the row and column groups.
On the right side of the Grouping pane, click the down arrow, and then click Advanced Mode. The Row Groups pane displays the hierarchical static and dynamic members for the row groups hierarchy and the Column groups pane shows a similar display for the column groups hierarchy.
Click the static member that corresponds to the static member (row or column) that you want to remain visible while scrolling. The Properties pane displays the Tablix Member properties.
In the Properties pane, set RepeatOnNewPage to True.
Repeat this for as many adjacent members as you want to repeat.
Have you ticked "Repeat header rows on each page" on the table properties?
(Right-click the table > properties)