Selecting total results on a report - reporting-services

I have a matrix with several columns and rows. Example the rows are made up of names for a company and along the top are total sales, total calls, etc. So each row will have a number under each column, and at the bottom of each column is a total for each column. Currently i have the report set up that if you click on any of the numbers it pulls up a detailed report for those particular items. But if you select the total number it brings up the results for the first row's column. Is there a way to make it return all the items details when you click the total number for that column instead of what ever the detail would be for the first row of that column? Does this make sense?

You can use the inscope function to check whether you are in the value or total row. If you are not in scope then pass the correct parameter to the details report.

Related

SSRS show X amount of rows per group

I have a report that in which I have some grouping, I want to limit the maximum amount of rows per group to be 5.
For example: In a group of purchased items I want to show the last five purchased per category.
I've tried with Ceiling(RowNumber("GroupName")/5) as when doing page break after Nth row but I'm not quite getting the results I want. I tried in the filter group property setting the Top N but this doesn't work at all.
Is there a way at all to force RowNumber() function to equal a fix value?
I'm finding this harder than I thought it should be. I cannot modify the dataset, so I can't do this by query.
Any workaround or idea will be much appreciated
You may not be able to filter a tablix using the RowNumber function, but you can hide a row if its row number is (for example) greater than 5.
Use the *Row Visibility" properties to specify an expression like this:
=(RowNumber(Nothing) > 5)
To restart counting for every group, use the grouping name as the scope (instead of Nothing).

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 Row number based on 2 groups

How to create row number based on 2 groups
My issue is
I created new field named test to test row number and my code in next pic link
Group based on ItemId
but if the item duplicated the row number start duplicate also like next Pic
hot to create number sequence based on vendor and itemid , i need the number sequence continues with every item even it duplicated
You need to add the scope. Then the runnung value will be calculated on the whole dataset or based on your grouping. For example:
=RunningValue(Fields!ItemId.Value, Count, "YourDatasetName")
=RunningValue(Fields!ItemId.Value, Count, "YourGroupName")
This gives you two different results based on the scope. And you need the second one I think.

how can we separate totals on the basis of group

how can we separate the totals on the basis of column value. need to create a report which have multiple columns, every column have multiple values. need sum of every row group value. I have added sample as below. please help me regarding same.
This is as single as context clicking on your field and clicking "Add Total". Clicking this option will add a subtotal to your next group. Clicking again on that total will create a new total on the next group level until you eventually get to the final, grand total.

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