SSRS - how to check if a row is toggled or visible? - reporting-services

I have a drill-down report in SSRS 2008 and I want to do some conditional formatting on the main row. For example, if it's not toggled add a different background color and different border.
I haven't been able to figure out how I can check if the current row is expanded or not using an expression.

There is a trick(check the result to see if it's ok for you. this solutions leaves a small space when the group is expanded) :
Add an extra column at the left for expand collapse.
Add a second row in the group with color.
Set expand/collapse only to the first row textbox
In the expand/collapse column set the second row textbox visibility to hidden.
Set the first controls(only at the textboxes) visibility to visible and the second to hidden, except the column with expand collapse. Set the first row textbox as the toggle item
Set both rows height to 0 (althought is will be automatically set to a very small value)
Now your report should look like the image below

Related

How conditionally format text color for an entire row based on the value of a separate field in SSRS?

I have an SSRS report and I want to dynamically change the text color for the "entire row" based on the value of the year field. So for instance if the fiscal year is current, make the text green and otherwise black. I found solution to conditionally update the background color for the row and I understand that using textbox properties I can achieve this for one single cell. The problem is that my reports are massive. Is there any way to apply the condition to the entire row or segment of the tablix without the need to copy the condition hundreds of times?
Thanks,
Matt
Just select the row header on the left of the tablix, hit F4 to get the properties panel visible, and set the 'Color' property expression.
What this actually does is set the `Color' property of all the selected cells/textboxes and, by clicking the row header, you have selected all the cells on that row. This means that you can still change individual cells if required.
In short, the Row does not have a Color property of it's own but by selecting the row we can set the entire row in one step.
Additionally, if you want to select a bunch of rows, or cells, you can do this by Ctrl+Left Clicking (or dragging round cells in the same scope) and then setting the properties en masse.
All the above work for most properties such as size, format etc.

Column Visibility in SSRS

I am using SSRS 2012 for my report. I want to hide certain columns in a report. I don't want to see spaces between columns in my report when a middle column is not visible. I have an expression that hides or make visible a certain column base on the value selected.=IIF(CBool(Parameters!Column.Value)=True,True,False)
But the issue I have with this is that I see spaces between columns in the table when the report is rendered.
In the image below, I want to be able to hide the Code column at the middle of the table without seeing any gap between columns in the table. Thanks for the help.
I'm assuming that you highlighted the Code column and then added the expression to the Hidden property in the Properties Pane?
Try right clicking on the column, selecting Column Visibility, and then entering your expression in the box under the 'Show or hide based on expression' radio button. This should collapse the column and not leave any whitespace when your parameter is set to true.

Extra empty lines when using visibility and toggle in SSRS

I have this setup for my report, (Produkt = Product, Belopp = Amount)
I have set the properties for the Quarter & Months as following:
Hidden: True
InitialToggleState: False
ToggleItem: Quarter (for Months) & Year (for Quarter)
I am getting these extra lines which are placed were the expanded information (quarter & months) will be placed.
The result is the following:
Here you can see the space I need donĀ“t want to be there...
As you can see I have also merged the cells under "Produkt" for nicer looks. This has no impact on the result.
Next view when expanding Quarter:
Next view when expanding Months:
Now, I would like to NOT see the extra space when open the report, how can i achieve this?
It is not enough to simply set it in the properties. Need to do some more.
In Report Desiner, right-click on the tablix row, select "Row Visibility...", set to "When the report is initially run" to be "Hide", check "Display can be toggled by this report item" checkbox, select the name of your toggler text box in the drop down.
Same can be done to columns.
You might have a conflict where multiple controls are all trying to set the visibility property on one or more cells within that row, and you're ending up with the space for the row being taken, but the content remaining hidden until the [+] is clicked.
Look into what is affecting the visibility of that row - via properties, grouping, or toggle items.
This would typically mean that you're using the hide and show from the properties box of the row... to remove the blank spaces you need to do it by right clicking on the row and selecting the tablix properties and changing the toggle item in the visibility section.

Get rid of group icon without hiding column

We have a report that gets populated by stored procedure. In the datatable we have a column "RowType" which is set to either 1, 2 or 3.
1 : Normal data row
2 : Important data row (In the picture this is the 1st row of data, the bold one)
3 : Devider rows. These are the rows with which we are having some issues. They are the two rows at the bottom of the image with the grey background.
The entire report is styled by either the "RowType" value or some of the other items in the datatable.
The Problem:
We have decided to change our report to make use of grouping, instead of drill down reports. I'm not going to go into the reasons for this decision.
The grouped rows each have a little icon to the left of it (Generated by report server) which is used to view the details of that row.(Sorry about that, pretty sure you know all this).
I have coded the "expand icon" to be hidden on rows that does not have detailed/grouped data, but that left me with the problem that the grey column would now also be hidden which leaves me with a blank white space instead of the grey cell.
Obviously this makes my report look horrible. Is there any way to remove the icon for a particular row without setting the Hidden property to True?
If not, is there a way to have the report row fill the background of a hidden cell with a defined colour?
The bottom right corner contains an example of what it looks like when one of the grey cells have been hidden. The bottom left shows the report with the unwanted icons in the grey cells
I think you could cut your current textbox out (the one with the +- icon, then add a rectangle from the toolbox into that cell, then paste your textbox back in. That way the texbox becomes a child of the rectangle. Then you can move your grey formatting to the rectangle, which will never be hidden.

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.