How to disable parameters in SSRS after report execution - reporting-services

What I want to do is once the parameters are set and view report is pressed, I want to disable the parameters.That is, once the user has entered the parameters and have ran the report he can not change the parameters now unless he refreshes the whole page.
Can this be done?
Thanks!

There's not a way to do this directly, but you can accomplish it using a pair of reports at the cost of needing an extra click from your users at certain points:
Create a "child" version of the report that only has hidden parameters.
Create a parent version of the report with no data elements that has public parameters.
Add a link-style textbox to the parent report whose action navigates to the child report using the parent's parameters.
For convenience, add a link-style textbox to the child report to go back to the parent to re-enter parameters. (optional)
If desired, include read-only textboxes displaying the parameters on the child report. (optional)
So to your user: They enter the parameters, then click on the link to view the report. If they want to change the parameters, they need to click on the link to go back, which will force a refresh.

Related

Keep parameter value when coming back from subreport

I have several multiple choice parametres that do not have default value. There is also link to other report. And parent report parametres are empty when coming back from drill through report. Is it possible to keep selected parameter values?
The parameter keeps selected values if it has default value initially. But I would like keep parametres empty on load
If you have an action to open a drill thru report, to get back to the parent report, you must use the 'Go back to parent report' button on the reports toolbar, NOT the browser back button.
This also means the parent report does not get re-rendered so it's instant.
This has been available since SSRS2008 as far as I know. Here's what it looked like back in 2012..
Note: this only works if you have used the "Go to Report" action
It won;t work if you used the go to URL option.
Alternative approach if using Go To URL
Basically you make sure you send all the parameters to the sub report even if they are not used. You could hide the unused ones.
Then add a button to your sub report that simply opens the parent report again and passes all the parameters back.
This is not ideal as the report will have to be rendered again, which is a pain if it's a slow report.
Another option is to open the sub report in a new tab (lots of examples on SO on doing this) so you can just close the tab.

SSRS: Consume input from user and pass it to subreport

I understand that this is not what SSRS is for, but I don't have the option of picking a tool. Ideally, nothing other than SSRS would be used.
We would like to implement commenting on our test reporting. What this means is that the user will click a button on a test, opening a comment subreport. I am trying to implement a subreport within this subreport with an input field, allowing the user to post a comment themselves.
From my understanding, SSRS only supports consuming user input through parameters, which I could use to populate a query that writes to the database. This is really less than ideal, since I would like the "submit" button to be inline. I'm really just looking to add an input and a submit button, which submits the input to our database. Trivial in html/javascript, seemingly impossible in SSRS.
Is it possible to extend an SSRS report to do this? What can I do to implement this requirement? Do I need to embed code / add a layer on top of the report to achieve this?
In other words, I require that the report be initially run, and then, optionally, for the user to be able to type in some text and hit "submit", which sends that text as a parameter to a subreport.

SSRS hyperlink to report prompting for values

I have main report which is using Register report in hyperlink.
So whenever a user clicks on Register hyperlink it should show particular register which is displayed in report.
Register report using 2 parameters - Year and Register
When I click on Register in main report it prompts me to select register from dropdown list instead of showing data directly.
What can be done to avoid this?
If both the reports are in the same project, you can use a Drillthrough Action. This'll let you create a link between the two without needing to construct the URL. In the Properties of an object, under Action, choose Go To Report. This will let you select what should be used for each parameter, with either static values or from your data.
https://msdn.microsoft.com/en-us/library/dd207031(v=sql.105).aspx
If they're in completely separate locations, you can add the parameter at the end of the URL you're using. Point to the report server of your Register report, and add &param_name:param_value to the end for each parameter.
https://msdn.microsoft.com/en-GB/library/ms155391(v=sql.105).aspx
You can add the paramters in the URL by adding "&rp:ParameterName=ParmaterValue" for each parameter needed.
e.g.
https://MyReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=MyReport.rdl&rp:Param1=True&rp:param2=False

How to restore Override Default button for default value in SSRS parameters configuration

If I click on an Override Default button, a textbox appears. How do I get the Override Default button back?
(source: socha.com)
Re-deploy the report to that folder, and the default settings (and therefore the option to override them) will be restored.
Redeploying the reports does not change the parameter settings. I had to delete the report on the report server first and then deploy it again and than I had the button back.
One option is to find out what was set on the default field and re-add.
Example, I messed up one of my default values on a "Date" field.
Steps to fix:
Edit a similar report that had the same field/default value. (Click the down arrow on the report on the web interface and select Edit in Report Builder).
On the folder structure on the left expand Parameters and double click the parameter you want to fix.
Click Default Value on the Report Parameter Properties pop up window.
Click the fx button and paste the parameter you grabbed from the working report. In my case the string was =datetime.Now().
Only way is to delete report and deploy it again. you can make it quickly:
open report in report designer and keep it open
go to reporting service web and delete opened report
go back to report designer and click save buton (or ctrl+s)
More by accident than intention I fought this issue and discovered a method that was simple. I have only repeated it once but it had the same results.
On the SSRS Report Parameters Properties dialog in Report Builder:
Select the parameter that is the problem
Select "Default Values" tab
Select the "Specify Values" Dialog
Set the value to something valid
Select OK and run the report
When it is complete, set the parameter value to whatever you would like it to be going forward
save the report
Now, if you go into the web interface, select manage from the report's drop down menu. Then if you look at parameters section of the management tab the "Override Default" button should be restored.
End Note: The button's appearance seems to be tied to the object property
<DynamicDefaultValue>True</DynamicDefaultValue>
of the parameter. This is found in "Parameter" field of the "Catalog" table in the ReportServer database. To test the dependency I wrote a quick WPF app with an XML viewer that allowed me to browse the parameters independently. I created a dummy SSRS report and by adding and removing that node in the XML properties could make the button appear and disappear. If I get around to making the connection string dynamic I will make the app available in this post.

ReportViewer Web Control and Dynamic Connection Strings

So I have a report in Reporting Services 2005. In it is one parameter (ConnectionString) which determines which data source the report will use. It also has several other parameters which are dropdown lists derived from the data source chosen in the ConnectionString parameter.
In Report Manager, this works great. All of the dropdowns are greyed out at the beginning. When you choose your data source, the page requeries/repaints and all of the available parameter values for the other parameters are filled in based on the queries for those fields.
However ...
In the ReportViewer web control, when the report is first loaded up, instead of dropdown boxes all of the other parameter fields are just empty textboxes. Choosing a different data source for the ConnectionString parameter doesn't requery/repaint the other parameters.
I've been flipping through the ReportViewer programming reference to see if there's some way to replicate the Report Manager's way of reloading the webpage with the report viewer upon certain parameter changes, but I can't find anything there that isn't over my poor little .NET head.
Any ideas?
Not sure if this is any help but I do have a suggestion. I would try pulling the logic for dropdown boxes out of the report and put them in an ASP.net page. Then pass the parameters to the report and control the rendering/refreshing.
HTH
UPDATE: So it turns out you must provide a default value for any parameters which in turn affect other parameters in your report in order to get the dropdown box to load properly on initialization. Also note this is recursive - so if you have a parameter which affects another parameter which affects another parameter, both the first and second parameter must have default values.