SSRS Row visibility based on another row's visibility - reporting-services

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.

Related

Hide Multiple Columns in SSRS Matrix

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

SSRS Multiple Datasets from different data sources into one table with grouping causing duplicate rows

SSRS report needs to have aggregate and grouping from two data sets. I have managed to get this working using the lookup funcion. Looks like it is now duplicating the rows when I only want it to show the top row.
I have two groups. Active and Stanby. Each has different values in it but the same value per row.
I tried to hide duplicates under properties, but that now keeps the first row and the border of all other rows with an empty field inside of it.
The hide visibility doesnt seem to work - i think it might be because of the grouping.
Can someone help?
See attached image

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.

SSRS 2008 Toggle visibility of rows based on data contained in row?

I am developing a report in SSRS 2008 R2 that is based on a dataset that has a column "row type" and I need to hide the initial visibility based on the valu contained in that column (only two values are returned) and then be able to toggle the visibility of the rows. The dataset is returning both the detail and summary rows - detail first then summary for each group - grouping and sorting being done in the stored procedure (no grouping in the report). This is a requirement that is out of my hands. What I would like to accomplish is having the detail rows hidden when the report is run with a toggle indicator on each summary row that when clicked will display the detail rows for that summary. Is this possible?
You need to create groups. If you have some way that your summary rows from the dataset are linked to specific data rows, then you should group on that.
Or you could group on the "Row Type" column. Keep the formula you are currently using for detail row visibility, and use the group header to toggle visibility. You can hide the group header for your summary rows using a visibility formula with the logical inverse of your current formula. This will it visible for the detail rows.

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).