Grouping in SSRS 2008 R2 - grouping and organizing fields - reporting-services

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.

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 Interactive Sorting child group from parent

Here's the issue.
I have the following report, which consists of a table (not matrix) that has 3 different levels of grouping
Report Design
I'm quite familiar with a basic function of interactive sorting, but what i need to do here is as follows:
Having in mind the pic previously shown, I need to add a Interactive sorting to the column "Porcentaje %" (percentage) in each one of the repetitions of LV1 entries, the issue is that I need that the sorting works on the LV3 group WITHOU affecting the sorting of LV2 group.
I have made the basic configurations on the Textbox Properties dialog, in the Interactive Sorting section, and the report do not crash, but also doesnt sort the information.
any ideas on how to do this?
Also, the headers are part of a ColumnGroup that repeats on each month i'm filtering on the report. Said group has the property Hidden set as true, and is toggled by a "Totals" columns outside the group.

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

Remove / disable empty groups from expanding

How do I remove empty/null groups from being expanded in a report?
I've created a report that may need up to 10 levels of grouping, but quite often the expandable groups won't actually need to go down that far.. for example this group has nulls in every group below it:
Ideally the above would just be 1.1.2.1. CIS (team) group with no ability to expand down further because the next group is null. I'd like this effect at any point down the expandable tree where the next group is null.
This is how my report is setup:
Each group's Display can be toggled by this report item property is currently set to the group above it.
I'm using Report Builder 3.0.

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