Group and subtotal columns in Reporting Services 2005 - sql-server-2005

I have a report (RS2005, against a MSSS2005 instance) which I have inherited. It shows a basic table of data: a handful of key fields which are used to group rows together, a few basic numeric fields, then a number of dated ('bucketed') fields (e.g. 1 month away, 2 months, 6 months, a year, 2 years, etc.)
The user would like to group together these dated fields in aggregated groups and be able to collapse or expand the columns as you can the rows. So we'd be able to show the next year's values' subtotal or expand it to break it out by month. Hiding the invidual months if the subtotal is shown.
This is basic pivot table behaviour (and can be done with the Group/Subtotal feature on Excel - that's the closest analogous behaviour I could use to describe the requirements).
While grouping by rows seems trivial in RptgSvcs, grouping columns and collapsing a group into a single subtotal and blowing it out again, seems hard to impossible.
Unless someone knows better?

You should be able to do this by selecting the columns that you would like to hide and set their visibliity to be hidden.
Then set the toggle item on the hidden columns to be the textbox that shows the subtotal.
This textbox will then have the [+] symbol on it, and clicking will show/hide the your month-by-month breakout(the hidden columns).

On the right hand side of the table control on your report (RDL file), you should see icons representing the detail and grouping information for the table.
Here you can see whether or not a grouping has a header/footer and how it is calculated e.g. =SUM(fields!mySalesValue)
You can also set things like whether it is collapsed and so on

Related

SQL Microsoft Reports

I’ve got a report I am creating which has four matrix’s on one box underneath each other,
One shows revenue for one category and one for Count for the that category and another two for revenue and count for another category with dates as the columns and data as the values
The problem is, the dates don’t align as on one category there isn’t data for last week but the other category there is
What I am trying to get is the matrix’s to show a consistent rate alignment and if there is values show them but if there isn’t values so empty cells so the tables align
Can this be done?

How to apply a single section across multiple columns in Business Intelligence

I do a lot of reporting out of our Electronic Health Record using a Business Objects product, and one thing I run into frequently is records for which most of the columns are the same, but a few may have multiple different values.
For instance, a report I'm working on has 8 columns, mostly static information about the patient/encounter, some lab values, and a column for the consulting physician. All the columns will have only a single value per patient/encounter, except for consulting physician which may have multiple. I'd like to somehow set the table to show only a single row for the data that is unchanged, so they don't end up seeing the FIN, MRN, and lab values over and over.
However, as far as I've been able to tell with my fiddling around, I can only apply a section or break to a single column. Creating multiple sections or breaks nests them. Does anybody know of a way to treat multiple columns as sort of a composite section?
edit: I did try pulling the consulting physician column out into its own table and then setting the room number as a section, but it still caused repeated rows of the other data for any that had multiple consultings.
Additional edit: As requested here's a mockup of approximately what I'd like to see. This is mostly how it looks already when I tell BO to use the room number (the number in blue, top left of each row) as a section, however in the case of the third room, it would repeat the information in the first 5 columns for each consulting listed.
Couple of ways to do it, but putting breaks on each column is what I would do.
So, starting from "FIN" and working to "Attending", add a break on each column. It will add a summary row for each, so it will look like:
Then select the summary rows, right-click, and Delete:

SSRS report. I need to total non aggregate data

I'm quite new to ssrs, so please bear with me.
To simplify - I have a sql server table with 3 columns -
ProductGroup, ProductName, ProductWeight.
My query simply selects everything, ordering by productGroup.
In my ssrs report, I need all individual rows displayed. Straightforward enough.
However, I need to insert a total ProductWeight for each ProductGroup. i.e. I need a rows with these totals between each changing of the groduct groups.
I can't simply aggregate the ProductGroups as I need all the individual records displayed.
I hope I'm making sense.
Many thanks.
This is actually very easy to do, but not obvious if you are new to SSRS.
When you are is design mode in the report development tool (assuming you are using Visual Studio (or BIDS)), look for the Row Groups section down at the bottom of the window. You should see a row in that list that has the text (Details) in it. Right click on that row, hover you mouse pointer over Add Group, and then choose Parent Group… from the context menu. Choose the column to group by; ProductGroup in this case. Click OK.
You will see a new column at the front of the tablix for the ProductGroup. Right click on the detail row under the new column, go to Add Total, and then choose After. This will create a new row below the detail row where you can add aggregates for columns where is makes sense. When you hover over this row for the ProductWeight column, you will see a little field chooser button, click that and choose ProductWeight from the dropdown. By default, that adds a Sum aggregate into the new row for that column. You can change the aggregate (to an average, perhaps) by right clicking on the cell, and choosing Expression from the context menu. Preview the report to see if that is what you need.
At this point, you can remove the original Product Group column since it is no longer needed.

SSRS - Aggregate of an Aggregate

I am new to SSRS but have plenty of experience with Crystal Reports and am trying to do something that in Crystal is fairly simple but after hours of frustrating research it appears is very difficult in SSRS.
I have looked at these which bring me close:
Running Total Over Aggregated Data
Aggregate Of Aggregate
I can semi-successfully obtain a group total but the group total resets to zero at the beginning of each page which isn't what I want.
I have two groups in my report the nested group has subtotals which are not totals of the detail data. How do I create Group Totals for the nested group subtotals? I have seen many people asking this question but so far have only been able to successfully create a Report total for the nested group subtotal. Can any one point me to a way to solve this?
It appears that this area is a regularly encountered problem that has no resolution. I see the same question raised here SSRS Aggregating Aggregates also with no resolution. I was hoping it was just a knowledge issue on my part but it appears to be a structural issue with SSRS.
OK So it sounds like you want to have a Subtotal and Grand total?
https://msdn.microsoft.com/en-us/library/ms170712.aspx
In this example it is the typical sales company
first line totals are easy, but the subtotal for the "daily group". Obviously you will have different groups/column names, but I think this is what you are looking for.
Right-click the Order cell, point to Add Total, and click After.
This adds a new row containing sums of the quantity and dollar
amount for each day, and the label "Total" in the Order column. Type
the word Daily before the word Total in the same cell, so it reads
Daily Total. Select the Daily Total cell, the two Sum cells and the
empty cell between them. On the Format menu, click Background Color,
click Orange, and click OK.
Then for the grand total
Right-click the Date cell, point to Add Total, and click After. This
adds a new row containing sums of the quantity and dollar amount for
the entire report, and the Total label in the Date column. Type the
word Grand before the word Total in the same cell, so it reads Grand
Total. Select the Grand Total cell, the two Sum cells and the empty
cells between them. On the Format menu, click Background Color, click
Light Blue, and click OK.

Im trying to populate a Sharepoint list with the most upcoming dates from certain colums of data from another Sharepoint list?

I have a list named Employee Dates, this list contains the columns:
Employee | CPR Completed | CPR Required | ETC
These columns keep going on for all of the training courses required for our employees with alternating columns for completed and required dates. I am using a workflow to calculate all of the required dates of training from the completed dates.
What I desire to do is make another list that will look at ALL of the columns for the required dates and find the soonest ones and populate that list with the soonest dates and from which column it was pulled from.
Any help as to how to approach this? I have been trying to use queries in Access and also some of the custom view settings in SharePoint Designer but no luck so far.
You could try an Excel table (they also have these functions in access if I recall, but I avoid access like a plague). To connect Excel to share point follow the steps in this article:
support.office.com
Ok, now that we are connected you should see all of the columns and values in excel. Next up we need to find the min date (easy) and then get the associated column name (a little harder).
Min Date: The formula should be something along the lines of =min(B1,B3,B5), jut type in =Min( and then CTRL-click on the columns you want to consider for the row. When your done close with ). After wards double click on the square in the bottom right corner and it will do the same logic for all of the rows.
Column Name: A little more difficult, use the min value from the prior column as the lookup value for VlookUp to get the column name. After wards double click on the square in the bottom right corner and it will do the same logic for all of the rows. I'd explain VlookUp, but I'd run out of characters and attention span long before I got to the relevant parts, and excel functions does a fine job of getting you the basics.
Anyway hope that helps,