• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 815
  • Last Modified:

Access reporting services report via URL and get raw HTML or XML output

I want to enable a monitoring system that we have (ServersAlive) to periodically check a report in SQL Reporting Services 2008 automatically.  I have it setup so that it checks a URL similar to the following and sees if the word "Failure" appears anywhere in the XML file:

http://reports.mycompany.com/ReportServer/Pages/ReportViewer.aspx?%2fReports%2fSQL+Server+Job+Status&rs:Command=Render&rs:Format=XML

This works perfectly when I set it up and continues to work for a period of time only after I check the actual report by through the RS interface by going to the following link:

http://reports.mycompany.com/Reports/Pages/Report.aspx?ItemPath=%2fReports%2fSQL+Server+Job+Status

The problem is that after a certain period of time (normally a few hours), the first link stops working and starts returning an error stating "Execution '2qqtn2yhtrejup452tvznt55' cannot be found (rsExecutionNotFound)".  It's like there is a timeout issue or somehow the second link only works for a period of time after I go to the first link (like the first link is only accessing a snapshot of the report and not generating the report on the fly).

Basically, I need a way that I can point our monitoring application to a URL that generates a report on the fly, perferably in XML format.  I can't just point it to the second link, because the HTML from that page is just the report rendering viewer and not the report itself that would have the report data (and the word "Failure") in it.  Any help is appreciated.
0
bmccleary
Asked:
bmccleary
  • 3
  • 2
1 Solution
 
Chris LuttrellSenior Database ArchitectCommented:
I think it has to do with the session either timing out or getting blocked (maybe by itself on a previous run)  see info at these links:
http://blogs.msdn.com/jgalla/archive/2006/10/11/session-timeout-during-execution.aspx
http://www.help-sql.info/27/7/637305.html
0
 
bmcclearyAuthor Commented:
Yea... I saw that page to, but it has more to do with programtically accessing RS via .NET.  I just want to find out how I can have a simple link that can access the report data without all the report viewer junk (toolbar, page control, export button, etc.) in the way which blocks/hides the source of the report data.  Do you have any thoughts on how I can just bring up one URL to view the raw report?
0
 
Chris LuttrellSenior Database ArchitectCommented:
Have you tried &rc:Toolbar=false?  That seems to have removed all that stuff for me.
but there are some warnings to note, again refer to John Gallardo's blog http://blogs.msdn.com/jgalla/archive/2009/03/23/hiding-parameter-area-when-viewing-reports.aspx
0
 
bmcclearyAuthor Commented:
Just tried that (using the second link I posted) to no avail.  The toolbar (and all Reporting Services navigation/tabs) still appear.  I tried it with my first link, and it worked, but that may because I reestablished a session by going to the second link first.  John Gallardo mentiones that by not having that, it won't keep the session alive and getting rsExecutionNotFound errors.  That's what I want to avoid... I don't need to keep the session alive, but I do need the report to regenerate each time that link is hit and then dispose of itself without throwing rsExecutionNotFound errors.  I will wait a few more hours and see if it is still doing it (as it is fine right now).

By the way, thanks for all the help!
0
 
Chris LuttrellSenior Database ArchitectCommented:
Your welcome, it helps me investigate and learn new things also.  Let me know your outcome.
0

Featured Post

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!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now