Lynn
Lynn

Reputation: 192

SSRS Report set value of parameter based on other parameter

I want to set the default value of 1 of my parameter using the other selected parameters dataset value. for example, the content of the dataset is something like

[{'name': alex, 'id': 1},
{'name': bloom, 'id': 2},
{'name': kelly, 'id': 3},
{'name': david, 'id': 4},
{'name': lyn, 'id': 5}];

then in previous parameter, the user choose for name = alex, then how to set the next parameter value = 1, which the previous parameter's id.

Upvotes: 1

Views: 1351

Answers (2)

Alan Schofield
Alan Schofield

Reputation: 21683

Is there any reason you need two parameters essentially pointing to the same thing?

Typically you would point you parameter's available values property to your dataset and set the parameter values to be ID and the parameter label to be name. This way the user chooses "Alex" from the list but internally the parameter value is actually 1

Upvotes: 0

papermoon88
papermoon88

Reputation: 476

Go to the parameter properties of the one you want to default > go to Default Values tab > Specify values > add 1 value and use this expression:

=Parameters!YourParameterName.Value

Upvotes: 1

Related Questions