SSRS Hide item in legend based on conditions

I have a legend issue that you can use in your SSRS report.

I have a pivot chart in my report, let us name the series of groups for the category. The histogram is displayed as follows:

Category A

Category B

Category C

Category D

...

I have different filters in this report, which sometimes appear only in two categories, for example. Cat. A and Cat B. The problem is that the legend will still display all categories, even if it does not appear on the histogram due to certain conditions made by users.

I have tried a lot now, but without any results. How can I only display categories in a legend that exist only in the panel?

BR

Niklas

+7
source share
2 answers

Right-click on the chart panel, select "Series Properties", select "Legend" and click "fx" next to "Do not show this series in legend." Make an expression that hides the legend for this chart if the value is NULL or zero. Here you have an example " http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/0e145eb1-924c-488f-95b1-56028c4f03a8

+4
source

Right-click on the chart panel, select "Series Properties", select "Visibility", select "Show or Hide Based on Expression", Give your condition (by clicking the fx icon, you will see a status area). Example. If you want to show only non-zero values ​​-

=IIf(Fields!Cat_A.Value is nothing,true,false)

+1
source

All Articles