Prerequisites : Reports are made using the reporting service. If you want to determine which options are selected in the multiple select drop-down box, you cannot determine the options. For example, the corresponding value is displayed according to the options.
Function implementation : UseAlgorithmImplement Multi-Value Determination in reporting service.
Algorithm Description : Set A = 1, B = 2, c = 4, D = 8, E = 16, F = 32. What can we see from this set of numbers? It is easy to get that their values are 2's n-1 power. What else? It is easy to ignore that B = a + 1, C = a + B + 1, D = A + B + C + 1, E = A + B + C + D + 1, F = A + B + C + D + E + 1. This rule determines one thing. If each number can only be used once, given a value, it is the only number that determines the value generation. In the multi-choice drop-down box, each number can be used only once. Therefore, if a value is assigned to each option, their value can be used to determine whether the option is selected. After a period of verification, I got the determination method as follows: divide the value by the value of the option to be determined, take the integer part and divide it by 2, and then take the remainder. If the remainder is 1, it will be selected, use pseudoCodeIndicates:
If (sum \ value mod 2 = 1) return true, whether the algorithm has been defined by the predecessors I do not know, I am relatively poor in mathematics, if you already have it, then laugh.
Implementation : Add an internal parameter to save the value. The value can be obtained through the SQL statement as follows:
Select sum (VAL) as sum from
(Select 1 as Val, 'A' as SEL
Union
Select 2, 'B'
Union
Select 4, 'C'
Union
Select 8, 'D'
Union
Select 16, 'E'
Union
Select 32, 'F') as t
Where T. Sel in (@ mulsel)
A \ B \ c \ D \ e \ f are the values of multiple parameters.
With this value, you can determine which values should be displayed and which should be hidden, and write the expression in "visibility.
Summary: This is just a method I have figured out. I think it is too difficult to build a car by closed doors. If there is a better way or I am in a dead end, I hope you will not give me any further advice. Here I will only give you some advice.