1

嗨,我正在制作一份报告,其中包含一些钻取报告。其中一些具有由 SSRS 生成报告时填充的数组生成的中值计算。我遇到的问题是,当有人从其中一个钻取“返回”到报告时,由于数组不再有效,因此中值计算不起作用。这不是一个参数,而是一个代码函数。所有的参数都来回传递就好了。

我现在有一个旁路来检查这种情况并在文本框中显示 Re-Calc,但我真正想要做的是当这种情况发生时触发重新生成报告。

我一直在互联网上搜索并没有找到任何可行的解决方案。

我不想要自动刷新。我正在寻找要添加到报告代码或表达式中的内容,以触发报告的刷新。我已经可以确定何时需要它在代码中发生,我只需要命令即可。

4

2 回答 2

0

The suggestion by "Registered User" is pretty close to what I think will work. However, if you use the default GUI drill-through option in SSRS, it may not always completely reload the report, which might account for what you're finding.

If you use the "Go to URL" option in the Action tab (instead of the "Go to Report" option), you cause the browser to reload everything. My anecdotal explanation is that when you use the "Go to Report" option, you're moving around within the ReportViewer framework and so it may be using some cache to regenerate parts of your report. When you use the "Go to URL" option, I believe it forces your browser to leave the current page and re-enter the destination page.

This link has good information on report server paths and how to manipulate the URL to control how your page feels.

Here is a resource on all the different URL parameters you can use in the "Go to URL" option to control how your page is loaded and what parameters are passed through.

To use the Go to URL option, you can use the global ReportServer & ReportFolder fields so you're not typing in the full address each time. Also, if you want to make sure your parameter bar always shows up (which is what I'm guessing you're referring to by "selection boxes"), you can use the rs:Parameters=true URL parameter. FYI, one of the other great things about the "Go to URL" option is that you can integrate all SSRS functions and some limited JavaScript to really control where and how your page goes.

Hope this helps!

于 2013-11-14T17:18:40.130 回答
-1

不能完全满足您的要求的一种可能的解决方案是在钻取报表上添加一个返回报表的链接。当您单击链接时,您可以将参数传递回原始报告,它将重新呈现报告。它不会帮助点击后退按钮的用户,但它会让您获得更好的用户体验。您甚至可以在显示 ReCalc 的字段上再次创建指向报告的链接,这样它们就不必点击刷新。

有人在另一个论坛上问了一个和你类似的问题。这个解决方案对我来说似乎有点矫枉过正。我建议使用上述解决方案并结合培训用户单击链接返回而不是单击返回按钮。

于 2013-09-13T20:09:49.990 回答