?
Solved

Accessing SSRS reports via web services using JavaScript

Posted on 2010-11-23
9
Medium Priority
?
796 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
LVL 10

Accepted Solution

by:
itcouple earned 1500 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Written by Valentino Vranken. Introduction: The first step of creating a SQL Server Reporting Services (SSRS) report involves setting up a connection to the data source and programming a dataset to retrieve data from that data source.  The data…
Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

764 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