Solved

Accessing SSRS reports via web services using JavaScript

Posted on 2010-11-23
9
755 Views
Last Modified: 2012-05-10
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.
0
Comment
Question by:jasonshifflett
  • 5
  • 3
9 Comments
 
LVL 4

Expert Comment

by:dquebe
ID: 34200329
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
 
LVL 10

Expert Comment

by:itcouple
ID: 34201273
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
 

Author Comment

by:jasonshifflett
ID: 34201594
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
 

Author Comment

by:jasonshifflett
ID: 34202400
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 10

Accepted Solution

by:
itcouple earned 500 total points
ID: 34203272
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
 

Author Comment

by:jasonshifflett
ID: 34205542
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
 

Author Comment

by:jasonshifflett
ID: 34205562
I actually get redirected to the Report Manager not the report
0
 

Author Closing Comment

by:jasonshifflett
ID: 34206034
Did not answer the actual question but got me on the trail of a work around
0
 
LVL 10

Expert Comment

by:itcouple
ID: 34206106
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
Steps to solve SSRS SQL 2008 R2 User Access Control (UAC) Permission Error With the introduction of SQL Server 2008 R2 and Vista (Windows 7 as well) came new enhanced security features. One of the features included was User Access Control (UAC) t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now