Hide Multiple Columns in SSRS Matrix - reporting-services

I have a Matrix report with some columns that are grouped by Month and Year in the Column Group. Now, these columns are being toggled by the Month Column as the Visibility Property is set to hide but toggled by the Month Column. But when the report is rendered, the hidden columns come out as blank and this defeat the purpose of the report, as seen in the images below. How do I do away with the blank spaces or which is the best way to meet this requirement?

I'm assuming you tried to set the individual column visibility properties...
You actually need to set the group visibility of your EnglishMonthName group to be toggled by [CalendarYear]. This will not hide the column completely (as you would not have anything visible to click on to get it back again) but it will collapse the data down and aggregate at the year level.

What you have done to hide your columns is actually working.
If you look at that WIDTH of each of the month then you will see they are of the same width. So according to your query you have the months appearing regardless of the corresponding data for that month.
I would do in two way depending on how the users would like it.
If possible and for better performance, I would alter the SQL query and do one of the following:
1. The months for which there is no corresponding data - I would remove the month names (or ID) as well
2. Rather than returning NULLs I would return a valid value like 0 or 'N/A' this will how the month as well as what the data actually is
To do it in the matrix you will need to alter the visibility of the month row as suggested by Alan Schofield

Related

SSRS - Merging cells of specific columns

I am developing a complex report in SSRS which should like below
Screenshot 1
output returned by stored proc have multiple rows of one User ID and based on that columns "Successful Orders -- Online - Total Orders", "Successful Orders -- Online - Total Amount" & likewise Retail - Total, Other - Total columns cells should be merged based on respective User Id.
I have used tablix control and tried adding grouping over columns which needs to be merged but it is not working as expected. in order to group I am setting Sum of returned Value in cell but yet no luck.
Can you please provide me some pointers in order to achieve whats expected. please let me know if you need more information
output after adding nested tablix
ScreenShot 2
also, distorted output with inner tablix. borders are causing issues
ScreenShot 3
Try placing a tablix in the cells containing the multiple rows to display them. Basically, you need to switch your approach from "How do I merge these cells?" to "How do I split these cells." Set up your grouping at the level you want your totals and then in each of the columns where you want the details displayed, add a tablix to display the details. You'll need to play with the grouping a bit to get it display correctly.
More details:
The sample you provided above should be one group level row, not multiple detail level rows. Add your group to that Tablix and the summaries you want for your Total columns. Then Merge each of the "Mode" and "Count" column pairs and insert a Tablix into that merged cell with the same grouping as the row with the Totals, but with only the Details row displayed (don't add group header or footer and delete the blank row and summary column that automatically gets added). Now just set your field values for Mode and Count and adjust your column widths to match the headings.
Here's a REALLY simple report that displays a Plant and the employees associated with that plant. This is the top level where you Totals group would go. The next image is the "inner" part, where you would add in another Tablix with the same group(s), but only the details displayed.
This is super simple example and you may need to include additional levels of grouping to match your report, but the fundamentals still the same - an "outer" Tablix with an "inner" Tablix with matching group(s).
There's a lot you can do with this approach by manipulating the groups, hiding/displaying different groups or even hiding the details and displaying subtotals.

SSRS Row visibility based on another row's visibility

My SSRS report has the requirement to filter the report based on a cashier's variance to balancing to 0. My variance is a calculation based on two different datasets and values within those data sets.
I've used some custom code in order to pull some of the data from a second data set and then I use ReportItems! expressions to calculate the variance with it all combined in one chart. The requirement is to only show those cashiers that are off balancing by more than +/-$10. I've tried to put the ReportItem! expression in the filter for the tablix, but the filters won't take a ReportItem! expression. My next thought was to just hide the rows that don't meet my criteria, but when I do this one of my toggled rows unhides itself because it's parent is hidden now based on my row visibility expression. Is it possible to hide all child rows of hidden rows? Ideally, I'd turn this into a parameter so that the end user can change the range of what data to look at.
Did you try hiding the Group instead of the rows? Usually if there's a child within a group that is hidden, the child will hide too...
I'm not sure why, but I had to put group visibility settings on it as well as the row where all the other row groups I only had to do the group.

SSRS Exclude hidden row values from total

I have a column called "Total" in SQL reporting service report.
When generating report I'm hiding some rows accoring to some formula,
But calculating the total that hidden rows values also calculating.
Can I know how to exclude hidden row value from total value?
You have two options:
Apply the same show/hide logic that you're using to hide rows to the aggregate expression.
Apply a filter at the table level.
To give an example, say I have some simple data and an associated table:
Now, say we want to hide all rows with negative values - we can do this by setting the row Hidden property as:
=IIf(Fields!val.Value > 0, False, True)
Which removes the row but doesn't change the total, i.e. what you're seeing:
We need to apply the same show/hide logic to the Sum expression:
=Sum(IIf(Fields!val.Value > 0, Fields!val.Value, Nothing))
Now the total looks better:
Taking a step back, if you want to hide rows and change totals, why not just apply a filter; in the above example this would be:
Which gives identical results without needing any show/hide logic at the row or total level.
Depending on the complexity of the expression this last option might not be applicable, but seems a bit neater to me if possible.

Grouping in SSRS 2008 R2 - grouping and organizing fields

I am writing a report in which there are groups in 3 columns, and a subtotal figured at the end of each group. When I create the grouping, a column is created out to the left of the report. I am normally in the habit of renaming the grouping column to the field that is being grouped and deleting the column in the report. However, the client wants the field inside the report and not on the outside (in other words he wants the columns to be specifically where he requested them. Is there a way to accomplish this?
Here is a representative example of what I am trying to achieve.
BusinessSegment Entity CostCenter ShipDate InvoiceNumber CompanyCode Estimated Amount
I want to group by CostCenter and CompanyCode, and provide subtotals at the end of each group for Estimated Amount.
You can't group inline except with an aggregate (min, max, sum, count) etc. Otherwise you are going to get the first result something is grouped on and have inaccuracies.
Can you just collapse the values of the grouping instead?
In SSRS generally with reports you have a 'details' grouping whether it is a matrix or a table report. You mentioned 'columns' so it sounds like you have header's of A, B, and C and they want to see a totals. You can generally add a grouping but then have it collapse or expand on demand. That way you present an end user with the data but they have the option of expanding it to see more if they want.
Since you did not specify if you have a matrix I will assume you have one. When you have multiple categories you can hit the grouping of a row or column and if you are having a matrix it is probably using a [SUM(field)]. The grouping of columns are showing all of them, however you can specify they are collapsed or expanded at runtime. Right Click the grouing and you get 'Group Properties'. Select the 'Visibility' pane on the left. Choose 'Hide' radio button and the default for your report will 'collapse' the values to be an aggregate instead of the expanded details of each column. If you want an option to have the user expand or collapse select the checkbox 'Display can be toggled by this report item:'. Choose a textbox or other object outside the collected scope and a user can be presented with the option to collapse or expand on default.

Exclude hidden table row from total

I've created a table with a group filter so some values stay hidden.
However, the row that shows the sum() of the above values, still counts the filtered values.
Usually I would apply the filter to the query, but I'm also using this same dataset in other tables on the same report so that's not an option.
Am I missing something here, or is this a flaw in MS Reporting Services?
This appears to be a "feature" of SSRS, apparently because it calculates values in table headers and footers before rendering the detail section of a data table.
One way around this would be to add a derived Boolean column to your dataset (assuming your data source is SQL Server, using a CASE statement or similar) showing whether the row should be excluded from the table where the filter is required.
You can then change your table filter to check the indicator, and use a expression to carry out a conditional sum to aggregate the correct total. Something like
=SUM(Iif(Fields!ExcludeRow.Value = True,0,Fields!ValueToSum.Value))
It's more of a question than answer...
How to resolve this issue if you know whether the row is hidden or not ONLY at the Row Group level?
i.e. if you're filtering on the totals by this Row Group, i.e. you cannot have a field indicating if Row is excluded or not in a dataset.
ex: I have AR Aging report which has totals per months, patients. I need to filter out negative totals per patients (Patient row group), but I have column groups as well - per month, so my dataset cannot be per-patient granularity and therefore, the only place SSRS can decide whether to hide or show the row is on the Row Group level...
I had the same issue but I had too many column totals where to enter the Iif().
I resolved it by removing the filter from the group and putting the filter into the Tablix Properties dialog box (Select Tablix, Right-click the top left corner grey box and choose Tablixc Properties).