Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding a series from the Legend

Status
Not open for further replies.

ookete

Programmer
Oct 5, 2004
180
US
I am making a line graph in RS and I have one Series group and two Value columns (Field1 and Field2, for example). What I want to do is be able to hide one of the data value-series when the user toggles a button. I am able to prevent the value series from actually plotting by typing the following in the Value text box:
Code:
= IIF(Parameter!toggle.Value = True, SUM(Fields!Field2.Value), system.dbNULL.Value)
When the toggle is on, then Field2 is plotted, and it is hidden when the toggle is off. However, the legend still shows Field2. In the legend box kind of looks like:
Code:
-- Series1 - Field1
** Series1 - Field2

Does anyone know a way I could hide the Field2 series from the legend? I am wondering if I need to mess with the actual RDL on the fly to totally exclude/include the second value field. I can't see a way to do it dynamically in the Properties window of RS, so I may have to get my hands dirty. Anyone mess with the Report Definition Language much that could give me an idea where to start?
 
I think the simple solution is to go into the properties of the second Legend and look for the InitialToggleState option. You can put a formula in there that will allow you to toggle it the same way you've toggled the other colunn.



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
Thanks Cat. Actually it's all still a single legend. I need to exclude the non-populated series from the legend, but there is no toggle or anything that will allow me to do this, apparently. This is why I think I need to literally remove the rdl XML code block for that series. Hmm...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top