ssrs 2008- changing chart type dynamically

Answered ssrs 2008- changing chart type dynamically

  • Tuesday, February 19, 2013 6:56 PM
     
     

    Hi,

    I have a requirement where i need to change the chart type at run time. I know this can be done by having overlapping charts and making there visibility either true or false depending on some parameter. I was looking form some other method to get this problem solved as this solution will increase a lot of rework in my case.

    Note: I am using SSRS 2008

    Can anyone help?


    • Edited by staycool Tuesday, February 19, 2013 6:57 PM
    •  

All Replies

  • Saturday, February 23, 2013 11:57 AM
     
     
    I am afraid you'll have to do this rework. No dynamic option is available in SSRS 2008 release.

    Thanks
    Salman
    http://muhammadsalmanx.wordpress.com

  • Monday, February 25, 2013 10:11 AM
    Moderator
     
     Answered

    Hi Staycool,
    Yes, this can be done by using the parameter to set the visibility of the charts. I have tested it on local environment, everything works fine. The steps below are for your reference.

    1. Create a parameter “Type” and add the available values for it.
      Label          Value
      column        column
      line             line
      shape         shape
      bar             bar
    2. Create four charts.
    3. Use the expression below to set the visibility of column chart.
      =iif(instr(join(parameters!Type.Value,""),"column"),false,true)
    4. Use the expression below to set the visibility of line chart.
      =iif(instr(join(parameters!Type.Value,""),"line"),false,true)
    5. Use the expression below to set the visibility of shape chart.
      =iif(instr(join(parameters!Type.Value,""),"shape"),false,true)
    6. Use the expression below to set the visibility of bar chart.
      =iif(instr(join(parameters!Type.Value,""),"bar"),false,true)

    The report looks like below.

    If you have any questions, please feel free to ask.

    Regards,


    Charlie Liao
    TechNet Community Support

  • Thursday, February 28, 2013 5:27 PM
     
     

    Hi Charlie Leo/Salman

    Thanks for your replies. 

    But i have another question, if there is any other way to achieve this in new versions( SSRS 2008 R2 or SSRS 2012) ?


    • Edited by staycool Thursday, February 28, 2013 5:33 PM
    •  
  • Friday, March 01, 2013 1:18 AM
    Moderator
     
     

    Hi Staycool,

    As far as I know, there is no other approch to work around this issue.

    Regards,


    Charlie Liao
    TechNet Community Support