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:

enter image description here

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:

enter image description here

some columns selected:

enter image description here


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -