• pietlinden (12/2/2013)


    Open the report in design view.

    Right-click a column, show properties.

    Click on the Visibility tab.

    When the report is initially run HIDE

    Display can be toggled by this report item (choose a textbox). It helps to rename the textbox so that it is called something other than "Textbox55", so rename it to something like "txtProductName".

    Does that answer your question?

    I wish it did! When I try that I get an error message:

    "The defintion of the report "test report" is invalid. The "test tablix" has "txtfoo" as a toggle item. Toggle items must be in boxes that share the same scope as the hidden item or are in a scope that contains the hidden item, and cannot be contained in the current report item unless the current grouping scope has a Parent."

    I tried to wade through this message but I'm not sure I get it. Column foo is the only grouping item. Columns bar, foe and fum are the details. So how do I make columns bar and foe conditional on column foo?

    Steps to reproduce my problem:

    1. Start a new report and set up some datasource

    2. Define a new datataset with this query:

    select 'foo' as foo

    , 'bar' as bar

    , 'foe' as foe

    , 'fum' as fum

    3. Put a table report on the design surface

    4. Make column foo a row group and call the text box "txtfoo"

    5. put the other columns in the details

    6. On column "bar", set column visibility to

    a. Initially hidden

    b. Toggle on text box "txtfoo"

    7. Preview the report

    8. Observe the error.