Accessing SSRS reports via web services using JavaScript

I would like to know the steps and code I need to uses in order to query a SSRS report using javascript using SSRS web services.
jasonshifflettAsked:
Who is Participating?
 
itcoupleConnect With a Mentor Commented:
Hi

The report URL returns XML and in the past my JScript colleague just grabbed that and parse it using some XML methods. I wasn't directly involved that so cannot provide code for it.

Regards
Emil
0
 
dquebeCommented:
Would your users have direct access to SSRS and be able to hit the URL's and authenticate, or would you need to have an intermediary perform the report request from SSRS and send back a PDF to the browser and have SSRS hidden (and unable to directly connect to)?
0
 
itcoupleCommented:
Hi

You can use reportserver URL and add &rs:Format=XML to get report XML if that is what you are after. Additionally you can apply XSLT using SSRS to get XML formatted the way you want it.

Hope that helps
Emil
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
jasonshifflettAuthor Commented:
What I am trying to do is uses javascript to auto populate fields,  I want the javascript to connect to the ssrs report via web service or url and query the report and pull the info back and populate the fields in the InfoPath form.  I am using infopath services to host the form so I cannot add VB or C# code.
0
 
jasonshifflettAuthor Commented:
I am wondering if getting the xml from the report via URL is the way to go, Do you have some sample code that demonstates this method
0
 
jasonshifflettAuthor Commented:
Here is the URL to the report
https://******.***.****.***/Reports/Pages/Report.aspx?ItemPath=%2f3161Project%2fIndividual+Assets
The report takes a single parameter UserID.  How do I have to modify the url string so that I can send a parameter and retrieve the xml.  I have tried a bunch of different ways and usually I either get a not found error or I get redirected to the report.
0
 
jasonshifflettAuthor Commented:
I actually get redirected to the Report Manager not the report
0
 
jasonshifflettAuthor Commented:
Did not answer the actual question but got me on the trail of a work around
0
 
itcoupleCommented:
Hi

I'm glad to here you found a workaround.

Regarding the URL you would have to use ReportServer the one you use to deploy reports (not Reports = ReportManager) and then add at the end &rs:Format=XML to pass parameter you just add &Parameter=Value eg. &UserID=itcouple

Regards
Emil
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.