UpwardD
UpwardD

Reputation: 767

Drill down a column in SSRS Report base on a value

I have reports that have drill downs. Currently, there are some columns with zero values and users are still able to click on that empty or zero cell and access a blank report. We want to take off this ability so that when a cell or column is zero or empty the drill downlink is disabled. How do I accomplish this?

Upvotes: 0

Views: 821

Answers (2)

Alan Schofield
Alan Schofield

Reputation: 21683

I'm assuming you mean you click on the cell and you have set the action on the cell to open a subreport? If this is correct then set your subreport name (in the action properties) to be an expression such as

=IIF(Fields.MyCell.Value = 0, nothing, "MySubReportName")

When the user clicks the cell nothing will happen.

Upvotes: 1

NickNick
NickNick

Reputation: 233

Does this answer from https://social.msdn.microsoft.com/Forums/sqlserver/en-US/4e46543d-a7a5-4c43-a7e9-8bfdf80a7d4a/how-to-hide-empty-cells-while-drilldown?forum=sqlreportingservices help you ? =>

Hi,

If you want to hide the plus sign automatically, a possible work-around is creating an additional independent column. Here is a demo:

1 If your details’ visibility toggled by group1, right-click group1’s column handle, insert a column to the left.

2 Right-click the details handle, click edit group, switch to the Visibility tab. Select “Visibility can be toggled by another report item” and Set Report Item to the cell of “independent_ column (new column we created)” next to the group1.

3 Right-click the toggled textbox of “independent_ column”, in the Properties window, switch to the Visibility tab. Using expression like “=iif(Fields!details.Value is nothing or Fields!details.Value = “”,true,false)” below Initial visibility.

Upvotes: 1

Related Questions