从 URL 生成报告 - SQL Server Reporting Services 2008 [英] Generate report from URL - SQL Server Reporting Services 2008

查看:33
本文介绍了从 URL 生成报告 - SQL Server Reporting Services 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 SQL Server Reporting Services 2008,当我打开以下 URL 时:

I have SQL Server Reporting Services 2008 and when I open the following URL:

"http://localhost/Reports/Pages/Report.aspx?someReport"

"http://localhost/Reports/Pages/Report.aspx?someReport"

我正在获取报告屏幕,我在其中填写参数并生成报告,

I'm getting report screen in which I fill my parameters and generate a report,

我的问题是如何在没有任何 GUI 的情况下执行此操作?通过批处理文件或 C# 脚本..

My question is how can I do this without any GUI? by batch file or C# script..

提前致谢.

============================================================================

=========================================================================

感谢以上所有回答,我成功生成报告并将其保存为 XML 使用以下链接:

Thanks to all answer above I succeed to generate a report and save it as an XML using the following link:

"http://Server/ReportServer/Pages/ReportViewer.aspx?someReport&dFrom=01/01/2012&dTo=08/08/2012&rs%3AFormat=XML"

"http://Server/ReportServer/Pages/ReportViewer.aspx?someReport&dFrom=01/01/2012&dTo=08/08/2012&rs%3AFormat=XML"

谢谢大家!!!

推荐答案

你的问题是你正在将参数传递给 http://server/reports...您需要将参数传递给 http://server/reportserver...

Your problem is you are passing parameters to http://server/reports... you need to pass parameters to http://server/reportserver...

我记得我第一次开始使用 Reporting Services 时遇到的这个问题.

I remember this issue I had when I first started using Reporting Services.

这里的 MSDN 可以帮助您:http://msdn.microsoft.com/en-us/library/ms155391.aspx

Here's the MSDN that may help you: http://msdn.microsoft.com/en-us/library/ms155391.aspx

For example, to specify two parameters, "ReportMonth" and "ReportYear", defined in a 
report, use the following URL for a native mode report server:

http://myrshost/ReportServer?/AdventureWorks 2008R2/Employee_Sales_Summary_2008R2&ReportMonth=3&ReportYear=2008

结果是这样的:

http://myRSServer/ReportServer/Pages/Report.aspx?%2fDefaultTenant%2fDialing+Reports%2fDialing+Agent+Performance&dFrom=01/01/2012&dTo=08/08/2012

如果你想将报告导出为ex​​cel/pdf/etc,你可以附加它:

If you want to export the report to excel / pdf / etc you can append it:

对于 Excel:&rs:Format=Excel

对于 PDF:&rs:Format=PDF

这也应该有帮助:http://www.mssqltips.com/sqlservertip/1336/pass-parameters-and-options-with-a-url-in-sql-reporting-services/

这篇关于从 URL 生成报告 - SQL Server Reporting Services 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆