SSRS Report. Update read-only data :)

Hi

Many people like Excel :) and SSRS allows to do Excel-Like reports and more however there is one thing I cannot do.... Update values (in database).

I have spoken with one person and it seems it might be possible to do it using Javascript/AJAX. Would that work, are there other ways to do it?

Many thanks in advance
Emil
LVL 10
itcoupleAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

planoczCommented:
I have not heard of anybody wanting to update a database from a report.
A report  excel or not was design to get you a hard copy of your data only.
Most of the time you have to have a app or direct contact with the database to be able to update fields in the database.
 
0
Megan BrooksSQL Server ConsultantCommented:
There is a neat trick for updating "simple" things from a report that I learned last week at the SQL Server Magazine conference. What kinds of updates do you need to do? If it's something like toggling a flag on and off with no confirmation then you can update directly (more or less). If it involves confirmations or manually entering new data, you will probably have to use hyperlinks in the report that send the user off to a web app to do the updating.
The trick, basically, is to use a stored procedure for the data source, and to do the updating there in the stored procedure. Hyperlinks within the report have a "Go to report" action that points back to the same report (usually a hyperlink would send you to a different report), passing a parameter to the stored procedure that tells it what to update.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
itcoupleAuthor Commented:
Hi Megan,

This is excellent trick I will definetelly use it. I wonder if that will work with more completed stuff? I want to use SSRS to perform rather 'complex' updates but there IDs would still be somewhere available to refer to it is just like in VBA Excel where I have cell change event which I can use to update database using adodb in any way I want. I think with Javascript (make fields editable) that should be doable. It is Excel like solution. It doesn't make sense apart from that it is as easy to do as Excel and I would agre with this point with the client :)

Regards
Emil
0
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Megan BrooksSQL Server ConsultantCommented:
Good luck with the JavaScript. :-)
OK, I admit I am a database developer, not a web developer, and the sight of JavaScript makes me feel queasy, though I do write in it sometimes, when forced to. The new VS 2010 ReportViewer control uses AJAX and might perhaps work better for this kind of thing.
0
itcoupleAuthor Commented:
I personally haven't build a single workable asp.net page in my life! Databases is what I like :)  but as long as it works for the client and makes his life easier and is fairly stable I don't have personnally anything against it. I've seens you mentioned AJAX recently in my other posts and I must admit this triggered the question :)

I'm quite interested in SSRS 2010 with AJAX, I might install it on one of my PCs to test it. Let me actually google new featues :)

Regards
Emil
0
Megan BrooksSQL Server ConsultantCommented:
There are two new launches, Visual Studio 2010 which launched last week and includes the new ReportViewer control, and SQL Server 2008 R2 which is launching "soon" and has a significantly improved Reporting Services. The AJAX ReportViewer is in VS 2010, not SQL Server 2008 R2, and is available now. Can I confuse you futher? :-)
0
itcoupleAuthor Commented:
I'm already slightly confused and don't mind being confused a bit more :)
p.s. Hmmm google doesn't seems to have anything about ssrs 2010
0
Megan BrooksSQL Server ConsultantCommented:
There is no SSRS 2010. There is VS 2010 and SSRS 2008 R2 (see above).
0
itcoupleAuthor Commented:
I should have read it more carefully... I thought if we are in 2010 everything is released :)

Anyway I tried w3School AJAX tutorial and constructed page to update 'scores' in database on text box change and works perfectly!! (took me 3h to learn it :p) I just need to speak with my Javascript person and learn how to transform read-only reports into read-write reports.... I know its against standards and asp.net approach but for me I see many benefits of that especially that creating very robust reports takes very little time.

Regards
Emil
0
Megan BrooksSQL Server ConsultantCommented:
Another interesting approach I heard about here on EE was to return XML from the ReportViewer, which can then be transformed into XHTML. It seems like that might allow the same stored procedure approach, but allow the displayed report to have entry fields and such as well as hyperlinks.
I haven't really given this much thought yet. I was viewing the XML format as an export option, but the ServerReport.Render method can return any format to the web app as a byte stream, so it could render in XML and then the web app could transform that to a data entry page and return it to the browser.
Normally I wouldn't want to go to that much trouble because I am for the most part satisfied with the HTML that SSRS produces, but for data entry it might be very useful. The AJAX-based report viewer also has a client-side (JavaScript) API that is described at http://msdn.microsoft.com/en-us/library/dd756405.aspx
The new ReportViewer control does not support SSRS 2005 in remote processing mode. Maybe it is finally time to upgrade?
0
itcoupleAuthor Commented:
Hi

That is an interesting option. I will discuss it with my colleagues at work and see if that gives them some extra benefits.

Thanks
Emil
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSRS

From novice to tech pro — start learning today.