group devider in reporting service report - reporting-services

My SSRS report is using groups to divide the data in group. I would like to have a line separator at the last row of the group. I did hide the group footer and header since it gives me an extra row when render the report to excel, So the bordering of group header or footer for this is not working. I wanted to avoid the extra rows in excel. Is there any other way I can try to get this done?

Probably the most powerful thing about Reporting Services is the ability to use expressions for any object property. Couple this with the out-of-the-box Previous function which allows you to access the previous value of a field and you have a solution.
Select the entire Detail row. Expand the BorderStyle property and enter the following code for the Top property (assuming we want a line separating all the departments):
=IIF(Previous(Fields!Department.Value) <> Fields!Department.Value, "Solid", "None")
This compares the previous value of the Department field with the current value and if they are different, it makes the Top border of this detail row to be Solid.
While this puts a line at the top row of next group rather than the bottom row of the previous group, it is visually and functionally equivalent to what you are after with the benefit of being really easy to implement.

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.

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.

How can i hide a Column group when I use pagebreak

I have made a matrix report in SSRS with two column groups. I have added one of the column group also in the Row groups to use page break so I can have each column group on a separate page.
And you see in the following pictures the preview of what has happened with the output.
Page One
Page Two
You see that the page break has worked but it doesn’t hide the other column that shouldn’t be present.
Does somebody has a clue how to fix this?
I don't think just adding a page break will hide the column group's visibility. In SSRS, you can set visibility of a column group based on a condition. Right click on the column group, select Group Properties, Select "Visibility", and "Show and Hide Based on Expression".
You could set an expression based on a field or parameter value. For example, if a parameter value is such, the visibility is true, else false. Example:
=IIF(Parameters!"PARAMNAME".Value.Equals(value),false,true)
I would think in your case, if some a field was null or blank, hide the column group. The page break will take care of itself.
I have solved it with the list object in the toolbox.
I have put the matrix in the list and used a page break on the list.

How to hide one row in a rowgroup?

I have a report in SSRS 2008 that has the following structure:
List
Tablix
Row Group
Row1
Field
Row2
Subreport
Is it possible to completely hide the first row in the row group, based on some condition?
I can hide the row, but the empty row still takes up space, I want the empty row to take up no space at all.
Part of the answer is given in the discussion that this question links to:
Try to set the Hidden property of the Static Row Group under the Details Group, in this case the whole row will disappear instead of the content of the textboxes.If you are using Report Builder, you need to switch to Advanced Mode (make sure that the Properties and the Grouping windows are displayed, go to the upper right side of the Grouping window and press the black triangle), click on the second "Static" item under the "(Details)" group and you can set the Hidden property on the Properties window.
However, this causes an exception when trying to export the report as PDF.
you can write an expression for the visibility of row.

How to get group headers to span a Tablix column

I am using Microsoft Reporting Services (rdlc, that comes with Visual Studio 2010)
Suppose I want to create a report that has a Group Header, detail rows, and a group footer.
(I'm using Tablix, but if there is a different way, I'm open to it).
Now, there are several columns, but I want for the group header to span the columns. Is that possible?
Another question:
Suppose I want to conditionally span columns in my detail row, is that possible? (and how?)
Say you have teams/reps and you want to send them their leads/appointments to work on for the day.
A lot of tutorials for grouping in a RDLC Tablix look like this:
But you want it to look like this:
Step by step, here’s how I’ve figured out
Add your table (Tablix) and ensure the DataSetName property is set
Highlight the details row and right click. Add a parent group to the row
Set the group by to e.g. TeamDescription, and check Add group header
The Row Groups panel should look like this. The indent for the Details is needed.
OK, at this point you’ve got what you don’t really want. ANDY and BELINDA are going to appear in a column to the left of your info.
But that’s fixable. In the spare cell above e.g. ApptStart enter e.g. [TeamDescription] and right click on it and choose to merge the cell across the other three columns. Set its alignment to center. Maybe bold too.
Then delete the first column as that’s now redundant.
Here’s how it should look by now:
You can get a field to span columns by selecting a few of the header fields and selecting the "Merge Cells" option.
As for conditionally spanning, you can't do that directly but I can think of a workaround. It really depends on the data you have so for a better answer you need to provide more information.
You could have two detail rows and conditionally hide one or the other. In one row the cells could be merged and not in the other. The only thing you couldn't necessarily control with this technique is the order of the rows, but it might work.