SQL SSRS Remove Blank Space after hiding a column - reporting-services

I am creating a report that consists of a simple data dump tablix.
Here is what my tablix looks like.
I am giving the user an option on what to group by, using a parameter, with their option being None, Master Code, and Sub Code.
I am following this tutorial
https://www.sqlservercentral.com/articles/dynamic-grouping-in-ssrs-reports
So as you can see, all the way to the left, I have a column called Group Desc which tells the user what the data is being grouped by, if it is being grouped.
Except in there, the Group header is a row, while mine is a column.
I wrote the expression to hide the column, and it works, but it leaves a huge blank space where the column was.
So when selecting something to group by, it works perfectly. However, when selecting the option none, to indicate I don't want to group by anything, it hides that column like specified in the expression, but leaves a blank space where it was.
I need a way to hide the column and remove the blank space that it fills. Is that possible in SSRS?

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

List Report in Report Builder 3 - Can it be side by side?

Can a list report in Report builder 3 be side by side instead of top to bottom and if so where can I make that change.
edit--- from what I have found on the net I have to do something along the lines off newspaper column, can some explain in layman terms how to do this.
This definitely possible, but not something offered by default. First we need to understand what SSRS creates when you select a List, then do something similar at the column level instead of the row level.
When you create a List, this is actually a Tablix with one row, one column and one TextBox, with a Rectangle embedded in the TextBox. Since it's a Rectangle, you can then embed any element in the Rectangle in the required position to achieve a free-form list:
You can see there is one group created automatically, called Details. This has no group expression, which means it will just repeat for each row in the DataSet:
So a simple List looks something like this:
To achieve a side-by-side List, we need to change the underlying Tablix to have a similar group to Details, but in a column group.
To do this:
Delete the row group Details.
Add a new column group (name doesn't matter). When creating a group, you must select a column from your DataSet - just select any row here.
Remove the group expression from the new column group
Now we have an equivalent Details group at the column level. It should look something like this:
When run this is now a side-by-side List as required:

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.

Make Tablix Column group show when filter returns no rows - SSRS

I am working on some SSRS reports and am running into an issue where Tablix Column groups drop from the table when the filter returns no rows.
Is there any way to make this column appear but with empty cells? I have another tablix grouping adjacent with the same columns and I want the columns to all line up on the multiple tablix.
Am I just missing a simple option?
Maybe add a
UNION SELECT '', n ..., '';
clause to your report query? It's ugly but should work. If you go this route, add a comment for your colleagues (or your future self) that will have to maintain the report.
I have not been able to make these columns appear on the SSRS report end. Specifically I am getting data by month for display. My solution is make a "Result" table on the SQL side with $0 for every combination, then update this table.
Frustrating, but it works.

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