SSRS 2008 how to hide chart lines based on parameters selected?

  • In my report users have to select whether they will to see 1, 2, or 3 years worth of data (there is no default). I have params controlling tablix items as follows

    two Boolean parameters:

    TwoYrs? T/F

    ThreeYrs? T/F

    Have been able to use the visibility tab of the tablix items to hide them depending on t/f state of the param. More difficult is finding where to control visibility of individual chart lines.

    chart by default shows data for year(today)-2. But I need refined control to show chart lines of year(today)-1, and year(today)-2 based on the params selected.

    What I've tried:

    #1 Created 3 Series groups with filters. eg. YearSeries1 to return only current year data but I don't see where to apply the expression to control the visibility of the Series groups.

    #2 have created two additional copies of the same chart and added visibility expression to each, but I see two problems. having 3 charts one on top of the other is throwing off the default spacing of the report items and isn't that a lot of overhead?

  • Why not just filter the dataset?

  • pietlinden. i get a little ticked off by these suggestions. If I have to explain,the report is used to deliver customized subscriptions to various partners. Some partners want to see all three years data and some only 1 year data. The charts associated with the tablix objects have to bee in sync. That is why it must be that all three years are available in the query.

    I solved this prblem with #2. Created 3 charts and made them responsive to a visibility parameter will allows the users to state whether the report is for 1, 2, or 3 year visibility. I had to switch from boolean parameter (if you remember you helped with that) to drop down because while boolean was ok for controlling just the tablix objects for 2 and 3 years back, it got complicated to reuse them for visibility of 3 charts. Also, I had to superimpose the charts in design view to sit exactly in the same location so that I didn't disturb layout. This is working great now.

    You often help me but make me so mad with the 'filtering' idea. I hope I don't get mob treatment now....:-)

    But, you very very often help me and this is a super duper forum and community.

  • Maybe you should have explained that to begin with.

    Bite me.

  • Hi pietlindin I will next time preface it with (am not going to change the query) 🙂 Ttyl!!!!

  • Each series has a Visibility property. You should be able to use this to conditionally show each series.

  • happycat, are you suggesting that instead of a single series called Years, I might have had 3 series eg. YearSeries1 (current yr), YearSeries2 (2014), YearSeries3 (2013) and that I then control visibility of it with the same parameters?

  • for example. I tried to follow the directions on msdn and they didn't jive with what I was seeing ie. I don't see a Data tab when I open Chart Properties dialog box.

    https://social.msdn.microsoft.com/forums/sqlserver/en-US/b6086686-08db-4959-a449-d3ab99e48163/how-to-hide-label-series-in-chart-legend

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply