I have an SSRS (SQL Server 2008 R2) report with several parameters. I'm having an issue where one of the parameters is not consistently choosing its default value when the report is first loaded.
Specifically, it works fine in BIDS but works intermittently (works on one server but not another) once deployed to IIS and viewed in IE. By intermittently, I mean it works on the server I deploy it to, but when I copy the RDS file to another server, the default behaviour for my parameter is broken.
Details
The parameter has a series of specified (constant) integer values specified in the Available Values section, which represent a selection of fixed reporting periods. The Default Values has a single specified value, which matches one of the Available Values.
Options: data type integer, no null values, no multiple values, parameter visible, automatically determine when to refresh.
Any ideas why I'm seeing this behaviour?
That is true, once the report is deployed to the server then the parameters are controlled at the server level.
Once item to note however is if you redeploy the report with changes to the default values THEY WILL NOT be changed on the server!!! The report must be deleted and deployed for the new defaults to take effect.
If you do not wish to delete the report then change the defaults by hand on the Report Server.
I've discovered my own answer to this question. I'm detailing it here for anyone else new-ish to SSRS who might be confused by the same behaviour. The parameters can be managed separately from the RDL file, and defaults can be overridden once the report is deployed to the server. To manage the parameters on the server:
Click on the report name link at top left on the browser page.
Click on the Parameters tab at left.
Manage the parameters as needed (e.g. set the default value).
Click Apply.
Click the report name link (large bold text at top) to return to the report.
Another solution without having to delete the reports (the issue when you delete the report is the logs are also deleted) is to open the new deployed report with ReportBuilder (Modifier dans le Générateur de rapports).
Just save the report and the defaults values will be changed.
lets say your report name is xyz.rdl
if you have set default parameter and deployed it to server now, it will not change on the server.
i suggest 3 options
1. change the parameter 'Has Default' value on the server, by right click manage on the report
2. delete the report on the server and redeploy it
3. deploy a dummy report or old version report with same name say 'xyz.rdl' which doesn't have this parameter, doing this will erase report parameters on the server, report stays in tact. then deploy your new version report with default parameter, now it should work.
I had similar issue. When a report has been deployed to the Server "Without" Default, and you subsequently modify this report in Visual Studio and change the same parameter to have a default, the server will not pickup that the modify report has a default now.
My workaround to this dilemma was to create a dummy parameter and put it to the top of the list. I then redeployed the report with the new dummy parameter and the same modified one with a default parameter. This time the server picked up that the parameter I was interested in as having a default value. I then proceeded to delete the dummy parameter in visual studio and redeployed the report. The parameter that I was interested in remained as having a default value.
I prevented deleting the report and adding subscriptions to it if I had went that route in order to fix my dilemma.
It takes a bit of work to correctly handle all the various scenarios, but it is (at least as of Sql Server 2012) possible to update the parameters from a script by loading the .rdl file as an xml file, and comparing it to the various settings available from the ReportingService2010.GetItemParameters method of the SSRS management web service
Based on that comparison, you can then update the parameters on the SSRS server using the ReportingService2010.SetItemParameters method.
Finally, there is a connect issue "Report parameter defaults not updated during deployment" that is a bit more limited in scope to allow just auto-updating parameter defaults.
I have noticed this is only a problem when making updates to static parameter values (Value "1"). The expression parameter values seem to a good job of getting updated (Value "=iif(1=1, 1, 0)". Screenshot example included below.
I would suggest using an expression. Or if it's a static value just type that in at the manager page. For example:
//ssrsdev/Reports/manage/catalogitem/parameters/Accounts%20Receivables/Bill%20of%20Lading%20Comparison
Also, I typically deploy my reports using the ReportServerTools powershell cmdlet, so I don't know if maybe their deployment does a better job with updating parameters. So you might try installing and deploying with that tool instead of from Visual Studio.
Write-RsRestCatalogItem
#------------------------------------------------------
# --1,FILES: Add
# Upload file from disk to server
#------------------------------------------------------
## TARGET FOLDER
$rsFolder= "/Accounts Receivables" #Datasets #Cost
$rsReportPortalUri= "http://ssrsname/Reports/"
$locDir= "C:\MyPath\Solution\Report Project\"
Get-variable rsReportPortalUri; Get-variable rsFolder; get-variable locDir
## SOURCE ITEM
$rsItem= "Bill of Lading Comparison.rdl"
$locPath= $locDir + $rsItem
Get-variable locPath
## Write-RsRestCatalogItem (1)
Write-RsRestCatalogItem -Path $locPath -RsFolder $rsFolder -ReportPortalUri $rsReportPortalUri -RestApiVersion "v1.0" -Overwrite "true" -verbose
Parameters - "Static" vs "Expression"
Related
Im a using SSRS (SQL Server Reporting Server version 12.06164.21) on a SQL Server 2014.
Using VS 2019 to create and deploy the reports.
I have a report that is using a dropdown which on the Report Paramaters gets it values from a query.
When developing I set a default value.
After developing is complete I then set the Default Values to 'No Default Values'.
Preview mode in VS2019 looks ok.
I then deploy to the server.
BUT...
The report on the Report Server browser still defaults to this value and also there is no '' option in the dropdown. ?!
This has also happened on anothe rsimilar report.
The above occurs on other users' machines and on different browsers.
Once a report is deployed, the default parameter values do not get updated when you redeploy the same report again.
Two ways to fix this.
Delete the report from the server and redeploy, this will set the default parameters to whatever they are set to in VS
Navigate to the report via the web portal, right-click the report and choose "Manage" then edit or remove the defaults in the parameters section.
I am trying to updated the default value for two of my date parameters in a report. I allow null values for all my date parameters and want to default two of the date parameters to null.
Below is a screen shot from the parameters property window in my Visual Studio 2019 SSRS project which reflects my update. The Sales dates should not have a default value but the event dates should have a default of null.
I have looked at the info in this entry about needing to delete the report from the server to have the default values update correctly: SSRS parameter defaults to NULL (All) even though no default value is set
So I navigated to our ssrs web portal http://XXXXXXX/Reports/browse/XXXXXXX. This is the same SSRS instance my Visual Studio project is configured for. Here I see an entry for each of the reports in my project. I delete the report whose default values I want to update. I refresh my browser to verify the report has been deleted. At this point I have tried simply starting the visual studio project which pushes the reports up to the SSRS server and also manually uploading the rdl file to the server from the portal itself. After doing either of these, I refresh my browser and I now see the previously deleted report again. Great- However, when I select the 'new' report on the server, and open it in Microsoft Report Builder (so I can see the parameter default values) I see it has set BOTH dates to default to null instead of just the one I wanted.
Any idea why this is happening and how I can fix it? I have verified the RDL file I am uploading from my machine only has a default value specified to Event_Date parameter. I tried cleaning the project and removing the bin folder and it still did not work.
If I make the changed to the RDL file on the server via Report Builder, it seems to work. However, I really need to have my VS 2019 project work correctly also as that is linked to our devops instance.
I'm having problems when using the option "Get values from a query" in my Parameter settings.
On the server everything works like a charm.
But when I deploy and then launch the report on my hosting, I get an error message:
If I use the option: "None", then everything works fine.
I've placed a test Tablix, to see the result of the dataset on the host, and also this causes no problem.
So the issue is only with the "Get values from a query" section AND only on the hosting.
Anybody got an idea?
EDIT: I turned EnableRemoteErrors on, as requested by the errormessage, but no additional info is given.
The detail of the error is in the SSRS log file located at -->
<SSSRS_INSTALL_DIR>\Report Server\Log Files.
That is where I would go. Based how you describe the dataset driving the parameters works but not when given a value then I would expect this to be a parameter mismatch or missing parameter. Make sure that you are feeding the dataset the parameters you think you are. Also, if you don't allow nulls then make sure you are supplying a default value.
You said, you placed a tablix on the report showing the results of the YearsDOW dataset and this fails. If this also fails when you set your available values to 'None' then we can assume, as the error states, that the issue was with executing the query itself, not your report design.
As this seems to work when you run it from your local machine in development but fails when run from the server I would suspect it's an authentication/permissions issue.
Check the credentials on the datasource in your development environment and compare these to the SSRS server's version of the datasource. Remember, by default datasources do not get overwritten so it maybe that you deployed the datasource initially with one set of credentials then then changed them in your development environment.
If this is the case and the datasource is not used for other reports on the server, then you can either change the project properties to overwrite datasources but personally I prefer to delete the datasource from the server and then redeploy, that way future changes won't affect the servers version unintentionally.
If the datasource is used in other reports without problems then you could just rename the datasource to something unique so it will get redeployed under the new name and your report will point to that new version.
I have this report when I deploy it it works. I come in the next day and under the Data Sources tab in properties I notice the report is pointing to our Dev environment. Now I know and double check that it is not coming from the solution as I have overwrite datasources equal to false, and there is only the one datasource in the project (named something completely different)
But what I also noted was when I change just the datasource on the report the Modified Date and Modified By does not change.
So it begs the question, is there anywhere on the SSRS site or database that I can capture who and when a datasource for a report is changed?
We are currently using SSRS 2005
Reportserver.dbo.Catalog has record of who first created and last modified any object on the server.
In order to populate a textbox in a page header I am setting up a parameter (as you cannot use Fields) and referencing this in the textbox. The parameter has the Default Value set to "From Query" and the Dataset and Value Field are set accordingly. This works a treat in developmentt in Visual Studio 2005. Once I have deployed the report and am viewing the report in the ReportViewer control I get the error:
"Parameter validation failed. It is not possible to provide valid values for all parameters. (rsParameterError)".
If I remove the parameter, the report works fine.
(Strange thing is that I thought I had this working earlier).
You've probably checked, but has the default value copied over? I've had issues in the past with reporting services where the default values were lost when I moved a report from one box to another.
Thanks for the answer - it has pointed me in the right direction...I have been using my own program to deploy multiple reports so rarely look at them via the Report Manager website. Anyway - I just deployed the report on my home PC and it worked fine....looking at the report in Report Manager on both PCs I found that "Prompt User" on the PC that wasn't working was not ticked...go figure. Ticking this resolved the problem.
I am liking the results that I am getting from SSRS, but I am quite new to it and am finding some things (like this) a little frustating...mouse and keyboard are lucky to not find themselves thrown out the window!