SSRS: Consume input from user and pass it to subreport - reporting-services

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.

Related

Is there a way for SSRS to remember my parameters when switching between Design and Preview mode?

When designing a report in SSRS, I put in my parameters and run the report.
If I see that there is a change in the Design that I need to make, I then have to flick back to the Design tab and make the change.
Once I go back to the Preview tab, I then have to again put in my parameters and wait for the report to run.
Is there a way to have SSRS remember the parameters that I had just entered and possibly keep the data in a cache so that when I flick back to the Preview tab, it just shows me the report rendered with my changes (but not new data etc)?
I'm pretty sure I can do this in Crystal Reports without having to re-enter parameters etc.
There is no way for SSRS to remember the parameters when flicking between the design/preview tabs - however you could select default values for the parameters so that when you flick to the preview page, the values will automatically appear in the preview tab.
To do this, right click the parameter > Go to "Default Values" tab > Select "Specify Values" and add the default values you would like to use

Adding a text box for report description before the report executes

Is it possible to add a report description (text) near the parameters area, before the report is run in the Report Builder 3.0. Essentially, when the users click the report and right before they run it, I want to provide them with a small description of what the report does and what the parameters. I can do that in the footer but it wont help, because the footer is only generated after the report has executed. Please let me know.
Thanks.
This is not possible with the default SSRS interface. You'll have to wrap SSRS with your own interface to add this.
To build your own SSRS interface, you can use a few different methods, such as embedding a ReportViewer control in a Asp.NET application, or using URL access in an iframe. See How to change the SSRS input parameters position in report
Of course, with Javascript and client side DOM manipulation, you probably could sneak your content into place, but it's not a supported option.
The main problem is that you can't show a report if parameters are needed for it until those parameters are chosen. If you don't want to provide default parameters another way to solve this problem is by actually having 2 reports.
In report #1 you put the parameters and the text box of instructions, but nothing actually using those parameters.
In report #2 you put the parameters and the actual report.
At the bottom of report #1 have a button, that just goes to report #2 passing the parameters selected.
I've used this technique to provide instructions on parameters when I want a quick-and-dirty solution (as opposed to a proper solution such as what Jamie suggested with embedding)

Set parameter back to default value in SSRS

Is there a way that a parameter value can be reset to it's default once the 'view report' button has been pressed.
I have a report with a free text input parameter that inserts users comments into a sub report contained within this report. They add their notes then hit view report, this re runs the report with their notes visible. The only problem is that the parameter box still contains the note they added previously - I've set the parameter to have a default value of ' ' which works the first time it's loaded but not once any text has been added.
I've added a 'clear comment' text box with an action of 'go to report' which simply loads the same report and clears it, but I was hoping there was something I could do that was little bit smoother.
Thanks
A straight up answer to your question would be (AFAIK) that this isn't (easily) possible.
On a related note, I think you'll have a hard time smoothening your current setup, because reports aren't designed for this task; you seem to be trying to use the report as a web form and as a report at the same time.
I would suggest a different approach to your task. You don't mention how you currently deliver the report, but a setup with for example an asp.net web page containing some input fields, a custom "view report" button (that makes sure the input lands in the report, possibly via the database) and a ReportViewer control, may work a lot better.

MS Access: Reports referencing other reports

I have several MS Access 2010 Reports that contain controls that reference other controls on other Reports. So, for example, if report1 has a text box called report1_textBox, and this text box gets its value from a text box on report0 called report0_textBox, then I set the Control Source property of report1_textBox to:
= [Reports]![report0]![report0_textBox]
I created a Form that the user can use to select Reports to open, and when the user selects a Report that depends on other Reports, my code opens those Reports before opening the selected Report. This works fine in some instances, but in other instances I get some strange behavior.
Going back to the example above, I encounter situations where even if I open report0, then open report1, the text box report1_textBox displays #Error as if report0 is closed or does not exist. But if I then just click on report0 and change its view then change it back, then go back to report1 and scroll a little, the text box report1_textBox "magically" changes from #Error to the proper value. I tried hitting the "Refresh All" button after opening the reports, and it does not update the text box.
Does anyone know of a way to fix this or at least work around it?
Thank you!
(Adding: Ideally, I do not want to open multiple reports like I'm doing now. If the user wants to view a report, I would like to only open that report, but from what I understand, if the selected report needs data from another report, that other report needs to be open. I can ultimately solve this by writing VBA code to execute queries, but I would like to avoid this, especially since I already have the data I need - it's just on another report. Does anyone know if it is possible to realize this ideal situation? Thanks!)
I would suggest going with VBA code for this.
Your question, actually, contains an answer (partial) - if you need data from another report that report must be opened first. However, the following code might help you somewhat.
You can open report(s) as hidden:
...
DoCmd.OpenReport "report0", acViewReport, , , acHidden
...
But again, I would recommend to write VBA code to pull the data using either existing queries from other reports or create new ones [queries].

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.