Multiple Choice and Hidden Reports

  • On Report Builder 3.0 I have created 6 reports that are hidden unless it is selected in a parameter:

    Report Code Visibility string:

    =iif(Parameters!WhichReport.Value(0) = "Occupancy", False, True)

    But what I want to do is make the Parameter a multiple select parameter so someone can choose two charts instead of 1 or choose all 6 etc but whatever selection is made all other reports need to stay hidden. Can this be done and if so how?

    Thanks

    Wayne

  • The only way I thought of is definately a ugly workaround. I usualy pass multi values parameters to reports, not use them in the report itself.

    You could pass your MV parameter to a db Stored Proc as a string using =Join(@ParamName.Value,",")

    Then in the SP split the values into a result set and return that.

    you'd start with "value1,value2,Value3"

    and get as a dataset

    Value1

    Value2

    Value3

    Then use those values to control your Visibility.

  • One thing off the top of my head. The Join function will create a string of selected values.

    Put this in each sub report definition.

    =iif(Join(Parameters!ReportParameter1.Label,",").Contains("Occupancy"),False,True)

    One thing to note.

    All Sub reports will "fire" even if you do not have the visble flag set to true. Meaning the queries for all 6 reports will execute.

    One way to cheat is add a parameter that the proc will use if its "false" then it will return an empty recordset that executes immediatelly. Or if your passing a daterange to the subreport make the endDate before the startdate, and it will execute immediatelly and return no rows. Make sense?

Viewing 3 posts - 1 through 2 (of 2 total)

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