如何在 ActiveReports 3.0 for .NET 中禁用数据缓存?
我需要修复 ASP.NET 2.0 应用程序中的一个错误,该应用程序使用 ActiveReports 3.0 从 SQL Server 存储过程源生成报告。 报告运行良好,但数据不正确,因此我们修复了存储过程并通过 ASP.NET 接口重新运行报告。
我们看到的是 ActiveReports 仍在显示早期版本的数据。 事实上,有一个从过程传递过来的报告数据字段,指示数据何时生成,并确认它是陈旧数据。
所以看来 ActiveReports 正在缓存早期的结果,我们想关闭该功能,但我在文档中没有看到太多解释缓存如何工作(生存时间等)或如何配置或禁用它。 任何见解将不胜感激。
顺便说一句,不确定这是否相关,但我们不使用 WebViewer 控件,而是创建 ActiveReport3 的实例,Run() 它,然后使用 PdfExport 类创建 PDF 图像并直接 Response.BinaryWrite() 输出。
I'm needing to fix a bug in an ASP.NET 2.0 app that uses ActiveReports 3.0 to generate reports from a SQL Server stored proc source. The report runs fine, but the data was incorrect, so we fixed the stored proc and reran the report through the ASP.NET interface.
What we're seeing is that ActiveReports is still displaying the early version of the data. In fact there is a report data field passed through from the proc that indicates when the data was generated, and it confirms that it's the stale data.
So it seems that ActiveReports is caching the earlier result, and we'd like to turn that functionality off, but I'm not seeing much in the documentation to explain how the cache works (time to live, etc) or how to configure or disable it. Any insight would be greatly appreciated.
Incidentally, not sure this is relevant, but we do not use the WebViewer control, rather we create an instance of ActiveReport3, Run() it, and then use the PdfExport class to create a PDF image and Response.BinaryWrite() it out directly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在 ActiveReports 中看不到有关缓存功能的文档的原因是,除非您使用 WebViwer 控件,否则没有任何文档:) 但是,在您描述的场景中 - 不使用 webviewer - AR 本身不会执行任何缓存。 我怀疑您看到的缓存是 HTTP 输出缓存,例如浏览器、服务器(通过页面或用户控件的 ASP.NET 输出缓存)或服务器和客户端之间的某些代理正在缓存先前呈现的输出。
WebViewer 确实利用了 ASP.NET 内置的缓存框架(例如 WebCache、HTTP 缓存策略等)。 请参阅 WebViewer 的 SlidingExpirationInterval 属性 和 ClearCachedReport 方法有关控制如何控制 ActiveReports 所做的缓存的信息。
The reason you don't see documentation about the caching functionality in ActiveReports is because there is not any unless you use the WebViwer control :) However, in the scenario you describe -without using the webviewer- AR won't perform any caching itself. I suspect that the caching you're seeing is HTTP output caching such as the browser, server (via ASP.NET output caching of a page or usercontrol), or some proxy between the server and client is caching the previously rendered output.
The WebViewer does take advantage of ASP.NET's built in framework for caching (e.g. WebCache, HTTP cache policies, etc.). See the WebViewer's SlidingExpirationInterval property and ClearCachedReport method for information on controlling how to control the caching that ActiveReports does do.