SQL 服务器报告服务:如何在打开报告时停止触发

问题描述:

我们有一些 SQL 服务器报告服务报告.那时我没有写,但我必须照顾他们.

We have some SQL server reporting services reports. I didn't write then but I have to take care of them.

这些报告在浏览器中打开时会触发,并且使用默认参数(搜索词和限制为空),它们会检索大量数据,这很慢.客户希望在用户输入参数并按下查看报告"之前不生成报告

These reports fire when opened in the browser, and with the default parameters (search terms and restrictions are blank) they retrieve a lot of data, which is slow. The client would prefer that the report is not generated until the user enters parameters and presses "view report"

不幸的是,我完全不了解 SSRS - 如何在报告打开时阻止它触发?

Unfortunately I don't know SSRS at all well - how do I stop the report from firing when it is opened?

如何在已部署的报告上执行此操作的详细信息(根据 Rihan Meij 的回答)如下:


The details of how to do it on a deployed report (as per Rihan Meij's answer) is as follows:

点击报告,点击顶部的属性".您可能需要稍等片刻,因为现在可能正在运行缓慢的报告.然后点击左侧的参数".

Click on a report, click on "properties" at the top. You may have to wait a bit, because the slow report may be running now. Then click on "parameters" on the left.

对于每个参数,请确保选中Prompt User",并且对于至少一个参数,未选中Has Default".再次点击左上角的查看"(或返回文件夹并点击报告名称)查看报告,注意报告不会立即触发.

For each parameter, make sure that "Prompt User" is checked, and for at least one parameter, "Has Default" is not checked. Click on "View" again at the top left (or go back to the folder and click on the report name) to view the report, and note that the report does not fire right away.

在报告生成器中,您可以通过过滤器"菜单执行此操作.从至少一个过滤器中取消选择值,然后保存报告.

In the report builder, you can do this via the "Filter" menu. De-select values from at least one filter, and save the report.

当报告没有参数时,是否也可以阻止报告在加载时触发?

Is it also possible to stop reports from firing on loading when the report has no parameters?

我发现我必须至少设置一个报告参数才能没有默认值以防止报告自动运行.

I found that I had to set at least one of the report parameters to not have a default to keep the report from autorunning.

我不得不使用这个配置(请注意,我保留的所有 3 个没有默认值的参数都接受 Null,因此用户只需单击 Null 复选框):

I had to use this configuration (notice that all 3 of the parameters I left without defaults accept Nulls so the users can just click the Null checkboxes):

[缺少截图]

让用户看到这一点并防止报告自动运行:

to get the users to see this and to keep the report from autorunning:

[缺少截图]