Show/Hide toggle images in run time


  • Hi,

    Does anyone know how to dynamically show/hide toggle images based on the visibility of sub groups?

    I pass a bool parameter to control the grouping levels in my report, but the toggle icons still displayed even the subgroups are hiden.


    Wednesday, April 14, 2010 4:48 AM

All replies

  • Go to the Visible --> Hidden property of image. Write an expression.
    Use IIF() to write the expression as per your condition to hide or unhide the image.

    -- Pushkar

    Wednesday, April 14, 2010 7:01 AM
  • Toggle Image is not an image showing in design time, so I could not find the properties for that images, so I think Pushkar, your solution is for common image we add into the reports, but not for the Toggle +/- images which are created by the reporting service during the run time.


    Thursday, April 15, 2010 1:03 AM
  • I am not confirm but for this you need to edit the rdl file xml code. and image.
    Thursday, April 15, 2010 5:16 AM
  • Hi Lucky,

    You cannot add/remove toggle entirely at runtime.

    Usually, I would add an additional column. Insert an image like toggle items in this column and let the groups hide/display by this image. Then you could hide this image at runtime.

    Hopefully this helps.

    Yao Jie Tang -Microsoft Online Community
    Thursday, April 15, 2010 6:29 AM
  • Lucky,

    You may check our latest FAQs here,

    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Thursday, April 15, 2010 12:27 PM
  • Hi,

    Thanks for all your replies,


    To YaoJie,

    I am not sure how toggle my added images once the user click on the image like the +/- image.


    To Charles,

    I followed the instructions on FAQs and added a column to the left of my parent-child columns, like following


    |  |+|Child-Model

    |  |   |Grandchild-Sub Model

    Then I set the Model group's visibility property, display can be toggled by this report item: to the 1st "+" textbox, and done the same for the subgroup.

    Also set the visibility properties of two "+" textboxes to "=Parameters!ShowModel.Value" and "=Parameters!ShowSubModel.Value"

    However I got background color blank, and I am not sure how can I setup the data field background color to the Make cell background color, and Model cell ground color, once the |+| textboxes are hidden.

    Also the width and height of the added columns to include|+| are randomly re-sized in run-time, how can I fix it?

    And how to set dataregion color when the textbox is hidden?


    • Edited by Lucky Eagle Friday, April 16, 2010 3:53 AM extra problems
    Friday, April 16, 2010 3:44 AM