SSRS Row Gropings Inverted (Export to Excel) - sql

When i run my report my report in SSRS all groupings work correctly however when i export this report to excel the proper rows are grouped but the grouping is inverted (i.e. the last item in the grouping has the '+' sign instead of the parent, top row)
thanks for any help in this matter!

In SSRS, when exporting to Excel, if the report item that controls whether another item is toggled is not in the previous or next row or column of the item being toggled, the outline is disabled also. See:
https://msdn.microsoft.com/en-us/dd255234.aspx

This can happen if you have your total added after the group rather than before.
(right click on the group and click add total before)
However, we really need more details/screenshots to see what the cause might be.
The drilldown in SSRS has more features than the grouping in Excel can handle so sometimes it is not possible to get in excel what you have in your report..

Related

VB.Net & RDLC reports: Display dataset records as fixed fields

I'm developing a rdlc report, that uses the data from a dataset, programmatically filled (from VB.Net). I need to display the data of the dataset as in the linked photo, so not in a classic "table" way, but each page of the report will concerne only one record of the dataset. Any cells of first page will be filled with the data of the first row of the dataset, the second with the second and so on.
Is it possible to display the report in this way with rdlc?
Further to my comment, I believe it's possible to do what you want using the table, with a bit of work on the layout.
Start by adding a table in the normal way, and get that basically working ie so that it shows all the data across one row. Then work on re-arranging the cells so that they are in vertical columns. Do this by right-clicking in the shaded area to the left of the rows, and select 'Insert Row'
Finally create a group around the whole thing, and group by Item Number or w/e is appropriate for your data. Then in the 'Row Groups' window at the bottom of the designer, right click your new group and select 'Group Properties > Page Breaks > Between each instance of a Group.
This should get you pretty close to your required layout.

Excel 2010 Macro Pivot Label Filter

I am having an issue running a label filter on a column (classic view) within my pivot table. I am trying to weed out the items in the data that are less than 180 days old. I can't adjust the data because it is used to feed multiple worksheets and I don't wish to copy the data and manipulate it for just this worksheet. Below is the line that I am running.
ActiveSheet.PivotTables("PivotTable5").PivotFields("Ageing").PivotFilters.Add _
Type:=xlCaptionIsBetween, Value1:="180", Value2:="9999"
This is a "between" filter. I have tried greater than and greater than or equal to but the same result occurs. After this line is run, I can click into the pivot table soft/filter down arrow and see that the filter is there as a between and even the days are inputted but the data does not reflect this. If I hit "OK" on the filter it then applies itself but I do not wish to have to do this manually.
Yes, "PivotTable5" is the pivot table in question. Can anyone help me automate this process?

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.

dynamic page break in SSRS

I have a report that displays summary data for three years. Each page displays data for one year. The the report is set to have thee pages. However, for some year that the summary data is negative and there is no need to show. Is there a way to skip this page in the report? There is way to hide controls based on rules, but I couldn't find any way to hide entire page output.
In order to do this, you can simply choose to filter the dataset so that rows/records with negative values do not appear.

SSRS Export to Excel does not do expand/collapse of groupings correctly

My report works and looks perfectly in the web viewer and looks great in PDF export as well. But when I export to Excel the exported file does not do the groupings correctly. The intent is to have a list of all employees and have their list of accounts underneath that is collapsible. However in Excel the entire report is grouped under one header and it collapses the entire report instead of allowing each header to collapse.
This is the proper way / web viewer:
But excel is collapsing the entire report not just each header:
I found the answer in this comment left here where the author mentions the way to do groupings.
http://connect.microsoft.com/SQLServer/feedback/details/508823/reporting-services-2008-group-by-export-to-excel-duplicate-rows-csv-ok-pdf-ok
The easiest way I've found to "fix" this is to re-create your hierarchical groupings (and the rows contained). Starting from the detail row (assuming you still have one) select the row header, right click for the menu, add new parent group using the next hierarchical level up. This creates a fun column that is to the left of your previous content separated by the dashed line. Select the column, right click for menu and choose delete. In the following dialog just remove the row, not the group you just made. This leaves the grouping containing only the details row/group. Select the existing details row header again, right click again, and choose to insert row > Outside Above (or below as your need might be). This adds the row to the next outer grouping from the selected detail row, similar as how 2005 allowed us groupings.
If I remember correctly SSRS 2008 can't deal with 2 level of grouping on the excel export (that was a confirmed bug), but i thought that was fixed either with SSRS 2008 R2 or a CU later on. Are you on the latest available version of SSRS ?