Display nested headers dynamically in SSRS? - reporting-services

Is it possible to create a nested set of headers in a Tablix in SSRS.
Such that in the first level grouping (Source), it shows a header of Count and a value for the total count of that group (source).
If you expand out the Source group, it would display the values inside the group, with a header that only displays when you expand the group?
I cant seem to nest the groups correctly. Do i need to use additional Total rows within the group?

If I've understood correctly, the easiest way is to build the report fully expanded with all the detail (and the totals you want to see when expanded).
Right-Click the row header, choose properties and set the row visibility for the rows you want to hide to hidden
Finally, in the same dialog, set the 'Display can be toggled by this report item' to the textbox you want to click when expanding the group.

Related

SSRS grouping columns to toggle visibility

I have an SSRS report with several columns - 3 of the columns had visibility set such that it could be toggled by a particular cell. The report was a single tablix with headings at the top and row groups set up below those headings. My toggle item was in the headings - i.e. outside any row groups. There are no column groups - I just want to be able to hide a few columns on demand. It worked fine but...
When a new requirement arose to throw a page within one of the groups, I had to move the headings such that they were within the highest level group. Since then I continue to get the error message:
"Toggle items must be text boxes that share the same scope as the hidden item or are in a scope that contains the hidden item, and cannot be contained within the current report item unless current grouping scope has a parent"
I have tried removing the toggle and starting again from scratch but I continue to get the message. I have also tried viewing the XML in case there is any stray toggle logic hanging around but it appears not. Any suggestions as to how I might resolve this would be greatly appreciated.
The best I could come up with is to add a new row at the very top of the tablix outside any groups and immediately above the headings (themselves within a group) and put the toggle textbox in that row. That seemed to do the trick (for Excel output anyway).

ssrs - repeat tablix at top of every page

I have a report made up of 2 tablix.
The first tablix just has some basic information in it, and is linked to a dataset.
The second tablix is linked to a different dataset and is made up of a lot of rows and spans multiple pages.
All I am looking to do is have the first tablix be displayed at the top of every page.
I cant add it to a header because you can't add a tablix containing data to a header.
I also don't want to just repeat column headers, because I need the entire tablix repeated.
Depending on how your Tablix is set up you could do the following:
• Select Tablix Properties and check column Headers > Repeat Header columns on each page In the grouping pane in advanced mode (click on small black down arrow on far right of grouping pane); select the corresponding (static) item in the row group hierarchy.
• In the properties grid, set RepeatOnNewPage to true and Keep with Group to After

RDLC : No page break - four sub reports within table/tablix

I have a situation where i have to display four reports based on checkboxes. So user can select different combination from four reports.
My problem is page breaks. I have tried different options (see below) from which two options (option 1 and 2) does not give page breaks at all whether option 3 gives page breaks for each tablix regardless of you do not want to see that report. Report is giving empty page for each tablix no matter there is no data in that tablix to be displayed.
With option 3 if i select all reports to show then everything is perfect.
I have tried these options
Option 1 (page break does not work)
Main Tablix -> each row : all subreports within rectangle within each row of tablix
option 2 (page break does not work)
Main Tablix -> each row -> Another tablix with group by ID within each row of tablix and then subreport inside each tablix. And I applied page break end on each tablix.
option 3 (page break works but gives empty page for non selected reports)
A List group by ID -> within a single row of this list I have places four tablix group by ID for each subreport.
Option 3 works but gives empty page break for those reports which are not selected. For example from Four reports if you select last two reports to display then you will get two empty pages in the beginning of report and third report on third and fourth report on fourth page which is correct. I have tried hiding tablix using table hidden and group properties hidden but still getting page breaks.
Any help will be much appreciated.
I have resolved this issue. For those who are struggling with same kind of situation, here is my work around.
I placed one list box and then four tables in a row and i placed subreports within these tables. i didn't apply any page break here. I am only showing and hiding tables based on report selection here.
Trick is within subreports.
As there were lots of tables and groupings in each report so i placed one table at the end of the each subreport.
This table should only have one cell. I removed header and 2 extra columns which were not required. Select dataset for this table. I did not want to pass dummy empty dataset so I selected my dataset but I created grouping on a parameter which I was passing from parent report and it has value 1. So now this table will only display 1 empty row. Reduce the height of the table. Plus I removed the border of textbox inside the cell. I checked 'Page break at end' option. In the Hidden expression I used following code which checks if there is any report which is visible after this (current) report. If yes then do not hide this table mean you want page break otherwise hide it mean no page break.
=iif(Parameters!AddReport_2.Value,false
,iif(Parameters!AddReport_3.Value,false
,iif(Parameters!AddReport_4.Value,false
,true)))
This solution works for me.
I would love to hear for a better solution.

How to hide one row in a rowgroup?

I have a report in SSRS 2008 that has the following structure:
List
Tablix
Row Group
Row1
Field
Row2
Subreport
Is it possible to completely hide the first row in the row group, based on some condition?
I can hide the row, but the empty row still takes up space, I want the empty row to take up no space at all.
Part of the answer is given in the discussion that this question links to:
Try to set the Hidden property of the Static Row Group under the Details Group, in this case the whole row will disappear instead of the content of the textboxes.If you are using Report Builder, you need to switch to Advanced Mode (make sure that the Properties and the Grouping windows are displayed, go to the upper right side of the Grouping window and press the black triangle), click on the second "Static" item under the "(Details)" group and you can set the Hidden property on the Properties window.
However, this causes an exception when trying to export the report as PDF.
you can write an expression for the visibility of row.

Report group headings not repeating on every page

I have an RDLC report with three tables and associated data sets. In my second table, I cannot get the two 'header' rows to repeat on each printed page. When viewed interactively, each table is on its own page and this isn't a problem. When I switch to print layout, e.g. my second table now spans two pages, and the second page gets no header rows.
Am I missing a setting or something?
ADDED: I do have the 'Repeat Header columns on each page' checked.
http://vbcity.com/blogs/xtab/archive/2010/06/14/what-to-do-when-the-repeatcolumnheaders-property-in-a-tablix-isn-t-working.aspx
That should help you out for getting them to repeat. (some of the time)
I still have an issue where I set the hidden value to an expression for the next group header that some of the time it won't render my group header on the next page. Very annoying. If someone knows of a fix for this please let me know.
Copied from Microsoft Technet Article. Helped me:
To display a static tablix member (row or column) on multiple pages.
On the design surface, click the row or column handle of the tablix data region to select it. The Grouping pane displays the row and column groups.
On the right side of the Grouping pane, click the down arrow, and then click Advanced Mode. The Row Groups pane displays the hierarchical static and dynamic members for the row groups hierarchy and the Column groups pane shows a similar display for the column groups hierarchy.
Click the static member that corresponds to the static member (row or column) that you want to remain visible while scrolling. The Properties pane displays the Tablix Member properties.
In the Properties pane, set RepeatOnNewPage to True.
Repeat this for as many adjacent members as you want to repeat.
Have you ticked "Repeat header rows on each page" on the table properties?
(Right-click the table > properties)