使用URL访问SQL 2005 Reporting Services

    技术2022-05-11  65

    在web应用中访问SQL 2005 Reporting Services最简单的方式就是采用URL直接访问。通过URL地址和参数,可以访问全部的报表资源。缺点是安全性不好,因为你的所有参数都在Query string中。

    这是一个URL访问的例子

    http://ctc-bar:81/ReportServer/Pages/ReportViewer.aspx?/BARReports/EBCdetailList&rs:Command=Render&rc:Parameters=false&startdate=2002-1-1 00:00:00&enddate=2007-3-1 00:00:00

    ctc-bar:81是报表服务器

    /BARReports/EBCdetailList是报表的路径: /BARReports/EBCdetailList

    &rs:Command=Render是执行报表命令

    &rc:Parameters=false&startdate=2002-1-1 00:00:00&enddate=2007-3-1 00:00:00设置报表的参数

    startdate是开始时间,设置为2002-1-1 00:00:00

    endate是结束时间,设置为2007-3-1 00:00:00

    有两个主要的参考资源:

     使用URL访问报表 (http://msdn2.microsoft.com/en-us/library/aa237743(SQL.80).aspx)

    使用URL设置报表参数(http://msdn2.microsoft.com/en-us/library/aa237743(SQL.80).aspx)


    最新回复(0)