add column group below previous column group SSRS - reporting-services

Is it possible to move a column group below another column group?
For example, I have report that shows the schedule for a week. The column groups are Day, Date, and Time Range. So the report should show as
Saturday
21-APR
09:00 - 12:00
Details here
13:00 - 14:00
Details here
right now it shows the two time range groups side by side.

The only way I can think of doing this is to use a sub report.
The subreport would take a single day as a parameter and if you have any row grouping, it would also have to accept a parameter to identify which row it belongs to.
The subreport should be built so that passing it a single day shows all the time ranges stacked with details. To do this, add a parent row grouping to details group, grouped by the Time Range field.
In your main report, your row grouping (if any), would remain the same, just make sure it does not group by any of the time related data that will appear in the columns.
Set the Column grouping to Day/Date and insert your subreport into the data cell area of the matrix.
If any of this is unclear please post some sample data and sketch up the required output so I can put together a more detailed answer.

Related

SSRS - Matrix with multiple datasets

I currently have an existing SSRS report which uses 2 datasets of data from a stored procedure, which is then aggregated in a bunch of matrix tables which automatically splits out columns by calendar months.
I have been asked to add a row from another table, and can add in the column through the Expression feature, but this does not take account of the month split, so it just adds in the total and repeats it for every column. Is there a way for it to be grouped by the month (month column is common between the two datasets, and they both run for the same time period.)
You can do this with an outer column group. You already have one by day, I guess. If you add another column group and make it grouped by YYYY-MM or another unique value then you can drop the SUM(Fields!ValueToSumByMonth.Value) in the new groups footer (add subtotal - after).

SSRS Visual Studio 2017 - Grouped by date, but same date showing separately

I am working on a report that displays the returned items in a date range. I have configured the report to be grouped by the returned date and checked the box for the page break between each instance of a group so that each page of the report will display items with each returned date.
When I preview the report, only the first page displays the date and the items returned on the date. From the second page and on, the report displays one item per date, even though there are multiple items with the same date. It just shows all the items separately on each page with the same date.
I tried grouping the items, but it still did not work.
Below is how the report is set up right now. The [ActionDate] is the only one that is grouped.
Look in your row groups under the main design window.
You will have at least
one group for your returned date. This should only be grouped on the columns you want to exclude from the detail (in your case probably just returned date)
You should also have a details group (the icon to the left of the group name will be 3 lines rather than a '['. This details group should have no grouping
If you have any more groups listed, check if they are needed
Here's a sample of a report design with a single group (in this case email) and a details row group (which has not grouping).
If this does not help, edit your question and show a screen shot of you report design including the row groups panel and I'll edit this answer.

SSRS Previous Function not calculating first time around

I have a report that I built in SSRS that calculates a sum of numbers for every business day going back 10 business days. There is a column group for each business day, and there are row groups for each item being totaled. The function to calculate the sum is a simple:
=Sum(Fields!INCOME.Value)
This returns data for example as such:
Now I am creating a report to indicate the change in data from day-to-day. I figured this would be simple with the Previous() function in SSRS. So I took the same dataset and in a new tablix I replaced the original calculation with:
=Sum(Fields!INCOME.Value)-Previous(Sum(Fields!INCOME.Value),"ASOFDT2")
The Column group is called ASOFDT2. This seems to work for all but the very first column, I get the following as a result:
My question is, does anyone know why this calculation is not performing in the first group, but is for all the rest? How can I make it properly calculate the first iteration of this? For informational purposes, I'm using SQL Server 2014, and I am building the report in Visual Studio 2013.
I have also reviewed the SO question: Use of Previous() function in reverse date sorted data in SSRS? though I am not sure how to apply this to my problem. The first column is my most recent set of data and I cannot select one column newer and just hide it.
The Previous() function gets the data in the Previous column. It doesn't have any understanding of what that data is, so if your columns are in Descending order, the Previous column will be the Next day, not the Previous day
It shouldn't be too hard to include the differential data in your dataset instead of trying to calculate it in the report. Just join the table to itself on YourDateColumn = DATEADD(dd, -1, YourDateColumn), and the right side of the join will have the previous day's data, and you can subtract for the difference.

SSRS 2008 R2 - Repeat textbox/table on all pages

I have a report in SSRS which basically contains a table of dates and blank columns for users to print and then manually write data into.
The report has a #FromDate and a #ToDate parameter as well as a #Location parameter.
The #FromDate and #ToDate parameters are used to populate a table with dates and is grouped per week (Mon to Sun) with a few extra columns that are blank for manually writing data. Above this table there is a textbox containing employee name.
What I am trying to do is to get the employee name to change for every page according to the #Location parameter. So if a location has 10 employees I need 10 pages with the different employees names at the top so 1 page per employee. The main table with the dates should repeat but the data will be exact on each page, basically the only thing that will be changing is the employee name at the top of the report.
Currently I have tried creating a table with just a header and adding the employeename field into the header but it only returns the 1st employee within the dataset and only returns 1 page when there should be 26.
What would be the best way to achieve this? It seems simple enough in theory but can't get it to do what I need.
A rough outline:
Create a subreport that shows your calendar. It will take the two date parameters.
Create a parent report.
The dataset in the parent should return a list of Employees for the selected location.
Create a table for that dataset, and put two detail rows in that table. The first will just have Employee name.
Test at this point and see that you just get a list of employees.
Place your subreport in the second detail row, and set the parameters to be handed through.
Change the properties of the detail group to have a page break between instances.
If you let us know what isn't working for you, we can give more specific advice.

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