1

我有两个包含销售统计数据的报告。我在办公室周围的 LCD 屏幕上在 IE 中显示一份报告,并将其设置为每 2 分钟自动刷新一次。

我还需要显示第二份报告,并让屏幕每 5 分钟在报告之间旋转一次。

有什么简单的方法可以完成吗?

4

1 回答 1

2

You are not listing a version of SSRS, so I will explain how it will work with 2008R2 and 2012, not sure of earlier versions. This is an interesting question that is more like tricking SSRS to be a front end dashboard product than it wants to be. You can do it though, here is what you need to do.

  1. Create a new report and call it 'master.rdl' for this example.

  2. Set your auto refresh to 120

  3. Drag and drop from the toolbox a 'Subreport' onto the design surface

  4. Right click the 'SubReport' and select 'Subreport Properties'

    A. Choose your report under 'Use this report as a subreport'

    B. Click on 'Visibility' on the left side and select 'Show or hide based on an expression' and click 'Fx' button

    C. Put in the expression

    =IIF(Minute(NOW) mod 10, TRUE, FALSE)
    

    D. Optional if you have Parameters click on 'Parameters' on the left side and put in your parameters.

    E. Hit Okay

  5. Right click the 'SubReport' and click 'Copy'

  6. Right click in the design area and select 'Paste'

  7. Right click in this new subreport and select properties again.

  8. Repeat the INVERSE of step 4 so it is

    A. using a DIFFERENT SUBREPORT

    B. the visibility is the inverse now of 4 and B/C above

    =IIF(Minute(NOW) mod 10, False, true)
    

You now should have two elements on a report that change visibility based on the minute divisible by 10. When it is at 10, 20, 30, 40, 00 it will show one report when it is anything else it will show the other report.

The import thing to remember is you must publish this report on the 10 or else it will be forever happening on an off time. You can establish a more advanced algorythm to account for this but it is easier to just time your publishing.

于 2013-06-27T21:43:00.123 回答