Build report with changeable default parameters - reporting-services

I am creating a SSRS report with default parameters. If all parameters have a valid default value, the report runs automatically when it is first viewed. However, after autorunning in this way, it is not possible to run the report with other values than the default parameter values. Parameter input is simply hidden.
I would like to create a report that always runs with one parameter (eg. "friday"), but after running gives you the option to change that parameter (eg. to "monday") Is this possible?

You have to specify available values in the below window (right click your parameter and properties). The list can be hard coded or retrieved from a dataset.

I have found the answer to this: it turns out that parameter input is not impossible after generating a report with default parameters, the UI element is simply shrunk to a thin line, that can be expanded by clicking on it. I'm afraid the solution is that simple, and I feel silly that I overlooked it (although it is kind of hard to notice).
I will accept GrandRalph's answer as it was the most usefull.

Related

SSRS passing Null values as parameter

Is there anyway to pass an optional parameter value as null in SSRS reports without using
:isNull=True in Report URL.??
I want to generate a SSRS report by firing the URL from the
front end application.
I will give two inputs as mandatory and another one is optional.
if optional input is not given, then the query should be refined accordingly
I want to pass Report URL as
"http://localhost/ReportServer/Students+Reports/&RollNo=1234&Name=John&Dept=null&rs:Format=PDF&rs:Command=Render"
I don't know whether I am asking silly or not. Please Help me out. Thanks in advance
Definitely not a silly question. I have done this within a .NET application.
However the URL is slightly different:
You need to use the report viewer, and call the render command inside of the URL. In the below example "ErrorID" is a report parameter.
Example:
http://myserver/ReportServer/Pages/ReportViewer.aspx?%20%2fReports%2fErrorManagement%2fErrorReport&rs:Command=render&errorId=6046
In the case for NULL values, the ISNull=True is the only way to accomplish this inside of the URL. Although, shouldn't be a problem. You can set the parameter to a default value of null, inside the report, and also in a stored procedure. When the parameter is not null, pass the parameter into the URL shown above.

Microsoft Reporting Services - How do you default parameter values, but not display the report?

I'm using Reporting Services 2012. It seems it displays the report unconditionally if you have default values specified in all report parameters. If you specify no default value for any one parameter it doesn't display by default.
Anyone know of a way to default values, but not display the report?
I have come across the same problem before, which certainly became an issue when the default parameters returned a very large number of results. It took a long time for the report to render, only for the user to instantly want to change the defaults and run it again.
Unfortunately the only way around this I discovered was to add a new "Run Report" parameter, that had no default value. The report would display all the other default values, but not the report itself. The end user then had to set "Run Report" to "Yes" to actually render the report, as only at this point was the final parameter set.

Call SSRS by URL pass parameter by label

There is a SSRS report, with one parameter, I only know its label not the values. So how can I get the report by URL? I know how to render a report with all the parameters set by defaults to Excel. But this report has the parameter not set to default, so I have to manually select a value then run in report manager. And important thing is I don't know the available values for this parameter as I have only browser permission. So can't download rdl, can see the parameters etc as you can imagine. The url method seems only allow you to pass parameter value not parameter label. So is there anyway?
No, there is no way to do that. You must use the parameter value in the URL, you cannot use the label (unless value and label happen to be the same).
If you don't have access to the report definition then you will need to find someone who does, who can then find where the parameter values are defined and tell you what they are.

How to force an SSRS parameter to be grayed out using an expression?

Looking everywhere on Google and cannot find the answer.
Is there an SSRS expression to grey out a parameter. So by default it is visible and can be selected. I want to to be grayed out and not selectable until a prior parameter is selected. I'd like to do this with an expression instead of cascading parameters. This is a special case. There must be something I can do in an if statement to make the parameter grayed out if the other parameter does not have a value selected. Please help.
You dont have to give always a value to the parameters from the form in the preview or by using parameters in cascading but maybe a default value from behind. It would depends on your code and what do you need to return for the dataset. I suppose that the dataset has fixed columns. Do you use sql inline or a store procedure? can you give an example of your code?

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.