loops - Iterate over columns of a report to dynamically show/hide them? -
i want try , implement parameter allow users dynamically choose columns going shown in report. idea create multiple value parameter has column names. after user hit view report want try iterate on columns , selected values join visibility.
how can iterate on columns inside tablix?
how can iterate on multiple values of parameter, can find if value selected or not?
i using ms sql reporting services 2012.
for table, i.e. fixed columns, can use following approach. it's not loop based individual distinct visibility check each column based on parameter selection.
set multi-valued parameter lists columns can displayed/hidden.
then, each of these columns in actual table, set column visibility use expression based on parameter:
the expression like:
=iif(instr(join(parameters!includedcolumn.value, ","), "col1") > 0, false, true)
what doing constructing string of selected values includedcolumn parameter, checking if column identifier included; col1 particular column. you'd use different constants each column.
so when running report approach can hide/display columns based on parameter selection.
all columns selected:
some columns selected:
Comments
Post a Comment