SSRS "B" Parameter change to default after change in "A" parameter - reporting-services

I have SSRS report with several parameters (based on SSAS cube). All parameters has own default values. For example there are 3 parameters.
At first I change 1st and 3rd parameters to another value. After that I change value of the 2nd parameter. But after that the value of the 3rd parameter changes also - to its default. But the first parameter will stay the same. There is some dependency in order - if I change 2nd parameter, the 3rd parameter will reset itself to default.
Is there any chance to avoid this situation? I want keep the value of the 3rd parameter same as I defined.
There is no connection between those parameters
Thank you for your help
Ondra

On Parameter properties, in advance tab select option as to not refresh, check below screenshot

Related

SSRS Parameter value based on other Parameter value not working using LEFT

I have an issue with SSRS parameters. I have a parameter that is based on a dataset value. This parameter is called UserOffice and correctly returns value GB10. I have a second parameter called IncludePrimary that returns the value of UserOffice (=Parameters!UserOffice.Value):
I then change the value of the IncludePrimary expression to be the first 2 characters of UserOffice (=Left(Parameters!UserOffice.Value, 2)):
I expected the field to show GB. Can someone please tell me what I am doing wrong?
Thanks
Rob
A parameter (your second one) isn't "updated" (the default value isn't re-applied) while the currently selected value(s) is (are) still in the list of available values after other parameters have been changed.
To update the second parameter, you must not only change its Default Value but will need to set its Available Values as well:
Or, of course, you can simply use your expression Left(Parameters!UserOffice.Value, 2) whenever you need it, so you don't need that second parameter at all.
Thanks to everyone who replied. They responses were very helpful. In order to resolve my issue I created a second dataset that calculated the default value (Y or N). I used set Available Values and then used my new dataset to set the default.
It works a treat.
Rob

ssrs forward parameter and available values

I have a drill down report in ssrs. Trying to pass the value of a parameter from parent report to child. Now in child report i already have a set of available values for that parameter. What i am trying to achieve is, when the child report loads the default value should be the one I am passing from the parent report and the report data should get loaded based on that and after the initial load the user can select form the drop down and refresh the report. For me the problem is when the child report is getting loaded its not taking the value of the parameter passed from the parent report.
Kindly help. Thanks.
I've set up a dummy report that does what you asked for and found that SSRS will just not work - not give an error at all - if you don't have it exactly right.
Here are the steps I followed to make it work.
Create the parameter on the parent report and ensure it is set and that you are setting it either at run time or via default.
Ensure that the parameter you want to SET exists in the child report and has NO default value (this may not be necessary, but will help with debugging if it goes wrong)
Make sure the child report parameter has the the available values for your drop down set and that the one you are passing is there
Set up the drill through using the action section of the properties and Go to report
Specify the drill through report
Choose the parameter from the Name drop down (the available parameters in the child report WILL be there) and set the Value to [#ParameterName]
Test
If you don't want a parameter on the parent report and just want to hard code the value you can skip step 1 and change step 6 to just use the value.
you need to set the default specific value to the parameter so it will not show you "Select Value" in dropdown list.
Once you send parameter from Parent report it will set the value.

dependent parameter does not refresh after first parameter is input

My SSRS report (2008 version) has two parameters. The first is a textbox receiving input for Supervisor' userid. The second is a drop-down which depends on the first parameter to show the all the staff name working under the supervisor. My questions is how the second parameter can refresh automatically after I input the first parameter in the textbox. Do I need a hidden parameter?
In parameter window go to advanced mode and select auto refresh always
In parameter properties for your first parameter, go to advanced properties an select always refresh.
Make sure that your first parameter name is the same as the #user_id used for your second parameter.
The first parameter doesn't need a default.

How to hide parameter based on another parameter value in SSRS

I have 2 parameters param1 and param2. param1 has values true and false. My requirement is that if I select true in param1 then param2 should be hidden and if I select false in param1 then param2 should be visible. Can this be achieved in SSRS?
As per Nathan's comment I am adding Amar's comment here as answer/partial answer
Unfortunately, you cannot change a parameter's visibility during run time. Alternatively, you can control the second parameter's values based on the selected value of the first parameter.
Check this post - Hide parameter (dropdown control from the toolbar) in SSRS based on another Parameter
As Amar pointed out you cannot hide parameters dynamically, but what you can do is grey them out for single-value parameters, described here.
For multi-value parameters that won't work, because multi-value parameters are not allowed to be null.
But instead you can modify your DataSet and the default value for the parameter. To limit the user's choice list.
Let me give you an example:
Let's say you have 2 parameters that are cascaded. So you want to choose something from the first parameter and depending on what you choose in the first parameter you get a different result in second parameter. (Microsoft has a documentation about this)
Now we can use this cascading to set the values in the second parameter. So for instance if we choose the value 1 in the first parameter we want the second parameter act normal and show its data to choose from, but in any other case we want the second parameter to have limited data to choose from. And this what I'm going to show. You got a second parameter that looks like this:
In the Available Values we choose the DataSet with its values and labels for the second parameter. Which could look like this:
Now in the DataSet for the second parameter, here DataSet1, we need to specify when to show the limited data and when not:
So what we do is set one label All with the value -1 when the value of the first parameter is not 1 else the DataSet returns all the data from the table/function/stored procedure/ etc.
Lastly the second parameter shall have the default value -1 with the label All chosen when the first parameter is not 1. So back to the second parameter properties. For Default Values the value -1 needs to be specified:
So now the user only gets the preselected All in the list to choose from when the first parameter is not 1. Otherwise the full list will be provided. All that has to be done now is to declare what is done when the value of the second parameter is -1.

Parameter is missing a value ssrs 2008

I have a parameter of integer datatype which is hidden. When i run the report, report gives me an error
Parameter X is missing a value
However if i make the parameter visible it works. I tried providing default value of 0 but that does not suffice my requirement as i have sub-report(Drill-dowm) depended on this parameter. Please help. Thanks!
Make sure that you have not specified Available Values for the parameter. Available Values should be "None" for internal and hidden parameters.
First of all,
Check that parameter's - Available Values by going to report parameters properties.
It must not be specified any values. So we should set it as None
Second work around is,
Just add a blank space at Specify values - in Default values inside report parameters properties.
This will surely work. Hope it will save your time.
I had to do an "if exists" statement for this to go away. It worked for me because it makes it always return a value even if that value is not need by my query.
if exists (my select query)
my select query
else
select '2'
// '2' would never be used, but it made ssrs stop giving me
// the stupid error and execute the rest of the query
If you specify available values from query, then default values must be in list of available values. Default value in (Available) = true.
The problem occurs also, if you have a parameter that depends of another one without "default value" inside the Dataset Query and does not admit null value.
For example:
Parameter 1 have a default value: NameEmployee from the dataset "EmployeeSearch"
But the dataset "EmployeeSearch" have a filter or a parameter inside the query named #Month that indicate the number of the month. So if the value of #Month is null, SSRS will say "Parameter is missing a value".
Assuming you had the same issue as I had, trying to run the report on a web page using a ReportViewer component, I managed to fix that issue by adding a null parameter before rendering the report:
C# code:
var parameters = new List<ReportParameter>();
parameters.Add(new ReportParameter("ParameterName", (string)null));
ReportViewer1.ServerReport.SetParameters(parameters);
Hope that will help
Just need to add 1 default value to get around this error (even though that default value will never be used).
-Under "Report Parameter Properties" for that specific parameter, go to the Default Values page.
-Toggle "Specify values"
-Add a value (I added: "just_a_filler_to_get_around_hidden_value_error" so when I look back at it later I remember why I did such a thing)
-click OK
I want to add to dmbreth's CORRECT answer.
I was missing the concept that the value of the parameter still needed to be tied to something. Originally, I was tying the output of a dataset by using the Available values portion of the parameter properties, but according to dmbreth's answer, that could not be the case. Finally I moved my output dependence settings from the Available Values section to the Default Values section and that did the trick.
So, in summary, in the parameter properties dialogue:
General Page - Allow multiple values checked(this option is specific to my application), parameter visibility set to internal
Available Values Page - None
Default Values Page - Get values from query, [appropriate dataset, value here]
Advanced Page - No significance here
Hopefully, that is clear enough to benefit someone else with the same problem...
I had a similar issue where the default value as set by SSRS is (Null), I didn't need the parameter for my report however; I found it useful for testing to filter down the list so I kept it, I guess I could have deleted it in SSRS on the dataset config. but I changed it to =System.DBNull.Value (I guess this could be any expression) instead and that worked for me, so then I can still pass in a value if need be and also set Available values (had to make sure a NULL value was added to my dataset) if I then decide to unhide at a later date.
There is one other potential here. I have had a situation where the report designer works but the server report object does not. The solution is to delete the server object and then re-save it from the designer.