简体   繁体   中英

calling SSRS report from PHP/URL with parameter

I am trying to call a Sql Reporting Services report from PHP using a url with parameters. I read that it is possible to do this, however I have had no luck at this point getting it to work. The Host is "ccf08db64" and the reportserver is called just that "ReportServer". The folder where this report is under is "HrAppsApplication" and the report itself is named "MainReport". I was told that all I had to do is simply add &parametername=parametervalue to the url and it should work, however it doesnt display anything for me. The link that I tried was: http://ccf08db64/Reports/Pages/Report.aspx?ItemPath=%2fHRAppsApplication%2fMainReport&ThisContactId=7767

what am I missing? if anyone has experience with calling a ssrs report via url with parameters, please fill me in... I would greatly appreciate any help you can lend me! thanks all :)

I think the URL you actually want is:

http://ccf08db64/reportserver?%2fHRAppsApplication%2fMainReport&ThisContactId=7767

This format works on my SSRS 2008 install, though of course with different server name, path and parameters.

If this doesn't work, does the URL posted in the first message actually render, even though its not using the specified parameters?

A distinction that is not always obvious to the uninitiated - the Report Manager and Report Server URLs have different folder paths.

Very often set to;

  • http(s)://ServerName/Reports - the path that users are familiar with

  • http(s)://ServerName/ - this is the one to append the query string to - 这是将查询字符串附加到的服务器

If you append your query string to the first one, will generally redirect you to the home page as described above.

https:// ServerName /ReportServer/Pages/Report.aspx? ReportPath & ParametersWithValues &rs:Command=Render

This is the format I'm using, though it is for a 2005 server

Also check out this article: http://techpunch.wordpress.com/2008/09/17/sql-server-reporting-services-url-parameters-in-sharepoint-integrated-mode/

Though it is geared towards Sharepoint, the URLs should be the same. It looks like the main thing you are missing is the rs:Command=Render

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM