Solved

Accessing SSRS reports via web services using JavaScript

Posted on 2010-11-23
9
749 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 10

Accepted Solution

by:
itcouple earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
I actually get redirected to the Report Manager not the report
0
 

Author Closing Comment

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

Expert Comment

by:itcouple
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

16 Experts available now in Live!

Get 1:1 Help Now