Link to home
Start Free TrialLog in
Avatar of karinos57
karinos57Flag for Afghanistan

asked on

User Input in SSRS

how can i include user input such as user can enter data in textbox and then it can update to database. How can i do that.  all what i am trying to do is to give the user to input some comments in the form and update that in the backend database.  Can anyone help me or guide me on this?  thanks

Avatar of santhimurthyd
santhimurthyd
Flag of United States of America image

SSRS is an static HTML page, it won't provide any User Interaction of getting value from user and ssend back to server for Inserting / Updating / Deleting.

It's Report to display the data in UI with desired formats.
Yes, you can create a "Parameter" that the user enter data in and add a button , so the user run a SP or a T-SQL code behind to push that back to the DB.


Let me know if you need more help?
I wouldn't recommend using SSRS as a medium for retrieving user input and save to a database.  SSRS is better suited for displaying data that already exists in a database.
Hi huslayer

Parameter have to be passed before generating the report, whereas he's expecting an Textbox in RDL to get the input.

Work around can be by placing the textbox in the normal webpage and value from the textbox can be passed as paramter to the SSRS which uses store procedure to return result set, In that store procedure you can insert as explained by huslayer.
All are right..SSRS is a presentation layer...but I can't advise the guy to setup IIS and learn forms and authentication to build his stuff in ASP.

While it could be done in a report and a sub-report.

It challenging...and unusual and limited too.
Avatar of karinos57

ASKER

thanks everyone for this info, i like to make it simple so i like the idea of creating parameter but questions is what is the limitation for creating the parameter?  can you provide detailed steps of how to create this?  all what i need is the user to be able to add some kind of comments in a text box something like that...thanks
check the below links
http://msdn.microsoft.com/en-us/library/aa337432.aspx

How your going to call your SSRS report, mean whether the Asp.Net application will show the report directly to the Report Server URL.

If you wish to pass to invoke from an asp.Net page with URL then the restriction of the URL size implies with the clear text of the comments in the URL.

If the user is allowed to browse the Report Server URL, then you can make the parameter Visibility in the Report Server and their the value be capture an dit won't imply the URL size restriction.
Here, i've created an article of it...

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/A_8737-SSRS-can-be-also-used-for-user-inputs.html

it's not published yet, not sure if you can view it...

Anyway here's the draft attached also...

The project can be downloaded from
http://www.box.com/s/sskhxfppful1l7sbytzh

I did it in 1 report and 2 sub-reports to look fancy, but you could do it in 1 report and 1 sub.

Feel free to ask if you need more clarifications.


Desc.docx
huslayer, thank you very much... this is the best answer i got.  One last question, can i import your project into ssrs and run it?  is there anything particular that i need to do during or before i import it?  many thanks again for your time.
ASKER CERTIFIED SOLUTION
Avatar of Jason Yousef
Jason Yousef
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thx
This is very cool.  The only thing is that when I make the changes in the database and go back to the first page of the report it isn't updated with the new comments.  This only seems to be the case for Preview within Visual Studio 2008 as it updates correctly when deployed but now I have run into an old nemesis: the vanishing Parameter Pane.  I have to put a useless, dummy (visible) parameter on the first report to have the Report Parameter Pane appear on the second report.  I've tried to find a solution for this but no luck so far so if you have any I'd very much appreciate it!
Hi,
You can change the URL to include PARAMETERS=True

http://<Server Name>/reportserver?/report&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=true

check here...http://msdn.microsoft.com/en-us/library/ms152835.aspx

I didn't try it, but I think it should work. Give it a try and post back.. also vote YES if the article was helpful.
Cool, where is the Vote option?