SSRS Hidden parameter results in "Parameter X is missing a value" - reporting-services

First I would like to apologise for any mistake and misuse of the english language as it is not my natural language.
I built a few reports using SSRS. Each one are feeded through different stored procedures.
Each stored procedures has two parameters: id and date. When I display the report the parameter I only want to be visible the date that will be supplied by the user. The id should be hidden and with the default value of 1. So, I turned the parameter id to hidden and set up a default value with the value 1. Im setting the default value on a report's definition level instead on the datasets used to feed the reports. PLease see below the steps I have done:
enter image description here
enter image description here
I've been through some websites(stackoverflow included) and I've seen similar issues. I followed the suggested tips but still no success.
Any help on this will be very appreciated.
Thanks
P.S. Im using VS2015 to design the reports and SQl Server 2014.

Without knowing more, my first instinct suggests that you have your parameters ordered incorrectly. If you have a parameter, P2, with a default value that is processed after a parameter without a default value, P1, and both parameters are hidden, then the report will fail citing that P1 is missing a value.
See my screenshot below as an example. You need to make sure that the parameters are loaded in the order, vertically, that they should be processed, especially if one parameter is dependent on another. Take a look at the ordering and leave a comment if you need further information.
Revised based on Response in Commments
Try opening the report manager via the Report Server web interface (http://[serverName]/[instanceName - reports is default]/Pages/Folder.aspx?ItemPath=/[directoryOfReport]). Click on the dropdown list beside the report name and choose manage. Check out the parameters tab and make sure the default is set properly. Sometimes, if you've messed with parameter properties numerous times in BIDS or report builder, the settings won't translate onto the server itself. Let me know if that fixes it.

Related

Default report paramter value in SSRS 2012

I am receiving the following error from my child report: "The report parameter 'prmDefaultValueForSnapShots' has a value of DefaultValue or a ValidValue that depends on the report parameter 'prmStoreName'. Forward dependencies are not valid."
I have a parent report that feed values to the child report to display all sales data for the specific store. However, this report is rather large, thus I'm trying to set a snapshot for it on the Report Manager to execute in the early mornings for better user experience. For the snapshot to work, I need a default value on the parameter and I have been unable to make it work.
If anyone has any idea how to resolve this particular issue. Please, give me any suggestion as you can.
Regards,
Marcus
I have been researching this issue since Tuesday and I have not had any luck.
I'm not entirely sure I understand your goal or configuration. I'm also not sure if prmDefaultValueForSnapShots and prmStoreName are parameters of the main report or the sub-reports, and which of the two throws the error.
However, this error may occur if a parameter depends on another parameter which is not yet provided. Note that the order of the parameters is important. By "order", I mean the order in which they are defined, which is also the order in which they appear in the list (you can reorder them using the arrow buttons).
Is it possible that prmDefaultValueForSnapShots depends on prmStoreName, but is defined before it?

Default Values for Parameter not Working in SSRS 2008 R2

I have a report (BIDS SSRS 2008 R2) that has a parameter that allows the user to select multiple values from a list (Sales Regions, lets say).
I want, though, since the list is long (15 or so possible values) have selected by default the 2 values that are used the most.
I configure that in the Parameter Properties >> Default Value dialog and when I run the report in preview mode it works, meaning, the default values are checked.
However, when I deploy it and run it with IE9 (or Chrome) it doesn't work.
Any ideas?
I would guess that your build is bad you are deploying and did not get updated from either a change you made or it is not overwriting a value. You can do a few things to ensure default parameter values are there.
Go the published report on the server and click the drop down arrow on the right and choose 'manage'. Now choose 'Parameters' on the left pane. Under the 'Has Default' column (3rd from left on 2008R2 and higher) it should be checked. Then under 'Default Value' it is either a specific explicit input or it will say 'Query based' meaning it derives its value from a dataset or similar manner. If this is different than your value you would expect and is explicit you can just change it here.
If it is query based and you observe that your data cannot be altered here I would go to BIDS and open up the SSRS project under the solution and choose to 'Open Folder in Windows Explorer'. Find your report's DATA file and delete it. Note this is NOT the report itself but a file similar to it like 'report.rdl.data'. This is NOT a step that most likely affects the build but merely the preview, however we wish to see the preview after the rebuild exactly as it would be. Go to your report's project and choose 'Clean' then 'Rebuild' to ensure you are removing all the data files in the bin in addition to the one you did explicitly. Rebuild will now build all the files from the instructions. Now click preview on your report, verify it is as expected with defaults. Publish again and observe.
If this still did not change the report I would guess the updates are not taking. I would rename the report on the server like 'report_old' and try to publish again.
If this still did not take I would check that the publish location we want is valid and we are deploying correctly and that any parameters are not getting data from shared datasets that are not set to 'do not overwrite' or weird edge cases resulting from publishing being halted due to config settings.
SSRS has had weird issues for me in the past with the issue of my files being under source control and then the system not wanting updates to parameters myself. Generally this is fixed with a rebuild but sometimes it does require a new binary file to be published.
I saw the same thing this week, and it turned out to be because there were values in my multi-valued parameter's "default list" that were sometimes NOT in the data selection -- in my case, the default list's values were invalid for some dates I might select.
Here's what caught me: SSRS allows invalid values in the default list during development previews, but does not allow them in production.
In my example, the report was being developed in Report Builder. When I did a "Run" (a preview) of the report in Report Builder, the list parameter's checkboxes were selected for the default list's values, as designed. But when I saved the report, and ran it as a user would -- running the report from the Reporting Services browser page -- then no values were selected -- no defaults.
Then, to fix this, I took all selection criteria up to that point, and applied them to the default list -- making sure the "Default Values" only included values within the "Available Values" -- then the default values were selected, BOTH in Report Builder development, and in SSRS production.
EXAMPLE: assume my selection query for "Available Values" was:
SELECT Type
FROM MyTable
WHERE Date <= #BEG_DATE
AND Date >= #END_DATE
And assume that, using 1/1/2013 and 12/31/2013 as dates, that the above returns 'A','B','C','X','Y','Z' as the list of values, for the user to select from (presented as checkboxes).
Now, assume that my selection query for "Default Values" was:
SELECT Type
FROM MyTable
WHERE Type IN ('A','B','G','H')
The problem in this example would be that, for dates 1/1/2013 and 12/31/2013, the default values "G" and "H" are not valid values.
The fix in this example would be to add to the 'WHERE' clause, in the "Default Values" query. It becomes:
SELECT Type
FROM MyTable
WHERE Type IN ('A','B','G','H')
AND Date <= #BEG_DATE
AND Date >= #END_DATE
Now, when this default values query is run for dates 1/1/2013 and 12/31/2013, the "G" and "H" drop out of the default values, and leaving only "A" and "B" as default values. "A" and "B" can both be selected, because they are also both in the Available Values for the parameter. So, defaulting the multivalued parameter now works, BOTH in development, and after saving the report (after deploying, after publishing) and running it from a browser.
I had this same exact issue today. I had two reports on SSRS 2008 R2 (sharepoint intergrated) and when I set one parameter to have a default value the change would not take no matter what I tried. It was working fine in BIDS (VS 2012). I even updated a label to verify that my changes were being uploaded to the server. I finally had to remove the reports from the server and upload them fresh again before the default value would work.
I had a similar issue, except that defaults were not even populated in preview mode.
The problem was that one of the codes being loaded from my Default Values query was not present in the Available Values query
For example, code 2000 was in the Default Values query but not in the Available Values query
Result: none of the default values are selected
Once I fixed my population query, all of my default values were selected.
Go figure.
I have also encountered with the same issue today. (23rd June 2016)
Reason: Once we upload/deploy same report on report server, then the parameters default values and default some properties are controlled at the report server level.
Solution: If you redeploy the same report with any utility like reportsync you must be ensure that you first delete all those reports/single report for the defaults values to take effect and then do sync operation.
Note: Before you do this take backups of all SSRS Report using same utility you use. Because sometimes your operation may get fails due to time out error or due to some server issues.
Alternate solution: If you have very few reports and you don't want to delete those reports then change the default values manually by going to Parameters Tab and tick the Has Default. That's it.
Hope this will help to all SSRS Developer.
I also was facing this issue.
Deleting the report, and reuploading it by changing the name, worked for me.

Multi value parameter in SSRS 2008

How can you tell what value was selected first in a multi value parameter in SSRS 2008?
Example
a,b,c
are the values
and I would like to know if b was selected first and if so change the string to be b,a,c
If you mean tracking which value a user clicked on first in the web interface, then you can't get this functionality through SSRS. A multi-value parameter doesn't preserve this order.
A few workarounds come to mind:
Create multiple parameters
Create multiple parameters such as "Primary BU" and "Secondary BUs." You could even remove items selected as primary from the secondary list.
Create your own interface
You can always create your own "Report Manager" interface and then call reports and serve them yourself. You get complete flexibility over the UI, but still get SSRS to handle data, report creation, and export formats.
Javascript hacking
The SSRS webpage is a webpage after all. In theory, you can insert your own code. I wouldn't recommend this, as updates may break your code though.

SSRS 2008: is it possible to make a report parameter NOT query-based for some linked report?

I suspect the answer is no, but here goes..
I'm using the WebForms Report Viewer on a public-facing website to allow users to report on themselves or their users (if the user is an admin user).
A report has a parameter called Users where an admin can pick a user from the list and generate a report from it. Mundane users can also view this report, but I programmatically create a linked report for each user and set the UserID value to their ID so they can only view themselves.
This works well except that the UserID parameter is query-based, and not every user is visible in the list using default settings (the user list is based off date range parameters can provide, and only users we consider 'active' during the date range are visible).
This is blowing up for mundane users that are not active for the default date range (which is the previous month).
I suspect the flow of execution is something like this:
Report loads with default parameters
The linked report rules are now applied and the value of the UserID is overridden with the ID in the linked report
UserID field is now hidden to prevent the user from changing it
SSRS can't find the UserID default value in the query results (that I didn't even want it to run) so it displays an error The 'UserID' parameter is missing a value
Through some testing I've found a perfect correlation between users not inside the default date range and users who can't view the report.
Can anyone suggest a way to make the report usable for those users that aren't in the default list? The reports are created programmatically so I do have a fair bit of control over the situation.
I would love to simply be able to mark a parameter in a linked report as no longer being query-based, but those properties are all read-only.
I really, really don't want to have to create duplicate reports to accommodate these users but I'm at a bit of a loss right now.
Any suggestions are greatly appreciated!
Go into parameter section of linked report.
Disable 'Has Default'
Click 'Apply'
Re-enable 'Has Default'
Click 'Apply'
and you're good to go!
I haven't figured out yet how to re-enable 'Query Based' as a default after removing it :(
Would be very much obliged had you found out......
Can't you just mark the param as 'nullable' then pass null in from the linked report ( you may have to alter the back end to cope with this?
Alternatively add an extra row to the 'users' day something like -1 "unknown user" then you can just watch for -1 and handle accordingly

Passing parameters between reports in SSRS 2005

I'm relatively new to SSRS 2005. I've built simple reports, and spreadsheets but I'm just beginning to delve into the world of fun that is SSRS/RDL. I'm trying to pass one (custom/non-query) parameter from one report (*.rdl) to another. While logically I would like to add a global variable, there doesn't seem to be any straightforward method/technique for doing what I want. It seems each page/report has its own parameters and reports aren't allowed to share each other's info.
I'm trying to simply hide objects/items based on an option that the user selects. Should a user select option A or B, I want to simply hide certain objects on multiple reports (within the same project) based on their selection. I simply check for the parameter value within an expression for the visibility property in any given object. Nothing complicated really. I've tested it out and on just one report by itself, it works. But try to get one report to read that value on another report, and there's no clear path in doing so.
Now as I've grown accustomed to SSRS, I believe there's the "normal" programmer's way and then there's the "SSRS" way. Both are mutually exclusive. So either I'm trying to do something that will never be allowed, it's a "built-by-design" feature and/or I'm going about it the wrong way.
Ideas? Suggestions? Maybe I'm going about this the wrong way.
Ok, so there's a only a few ways to pass parameters from one page to the next. I (eventually) discovered that I was simply trying to pass a boolean from one to the next. The data was not from the database, it was something manual ('true/false'). At first I thought I needed something akin to a global variable which there are a few built-in globals in SSRS. But as I found out, you can't add anything to that collection.
So on this one report I have an image pointing to the 'Next' page of the report. Within that object/image, you can set navigation parameters on that object/image. Makes sense so far.
On the following page, your report parameters must match the position in which the variable was listed from the following page. I guess SSRS passes a non-key based arrays from one report to the next so index/position is vital for getting the parameters right. Hence the arrows allowing you to adjust the parameter order. That was what tipped me off, but I thought it was SSRS was more adept then that in the sense that parameters being passed had to just match in name, not position.
(IMHO) as I see things, SSRS has/tries/must remain fairly static. There's no real sense of events, OO, etc. and yet SSRS seems to stitch elements from VB, VBA (expressions), SQL/T-SQL altogether and spew forth a usable product. I guess that's my newb perspective. I'm sure it will change with time.
Using subreports might allow you the functionality you need. Otherwise, the only other way I know of to "pass" parameters from one report to the next is using the query string.