我想在另一个应用程序的 IFrame 中显示 SSRS 报告的输出。我将源设置为如下所示:
http://SERVERNAME.domain.com/ReportServer?%2fTBI_MSCRM%2fCustomReports%2f%7bdafdbed0-1e96-e211-a5da-001d0967e0fc%7d&rs:Command=Render&rc:Toolbar=false
我遇到的问题是报告的输出似乎是为 session 缓存的。
如果报表上的时间戳在刷新页面时未更新。要查看更新的数据,您必须关闭所有浏览器并重新打开页面。在 SSRS 中,快照未打开,没有缓存刷新计划,因为选择了“不缓存此报表的临时副本”选项。
我已从 IFrame 中取出 URL 并单独运行它,得到了相同的结果,因此不是 IFrame 导致了问题。我需要的是每次访问 URL 时刷新此报告。
非常感谢任何想法。
最佳答案
您可以通过清除 session 来强制报表服务器在每个请求中获取新报表。
只需将以下内容添加到 URL rs:ClearSession=true
它将在您的 URL 中实现,如下所示:
http://SERVERNAME.domain.com/ReportServer?%2fTBI_MSCRM%2fCustomReports%2f%7bdafdbed0-1e96-
e211-a5da-001d0967e0fc%7d&rs:Command=Render
&rs:ClearSession=true&rc:Toolbar=false
清除 session :
A value of true directs the report server to remove a report from the report session. All report instances associated with an authenticated user are removed from the report session. (A report instance is defined as the same report run multiple times with different report parameter values.) The default value is false.
关于caching - SSRS 报告不通过 URL 访问刷新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15685857/