Reporting services SSRS如何以幻灯片方式在报告之间轮换?

Reporting services SSRS如何以幻灯片方式在报告之间轮换?,reporting-services,report,dashboard,ssrs-2008-r2,Reporting Services,Report,Dashboard,Ssrs 2008 R2,我的任务是创建一个显示在电视监视器上的仪表板。此仪表板有5个不同的图表,需要以幻灯片方式显示,也就是说,每次显示一个图表,并在一定时间间隔内旋转到下一个图表 我使用了一个发布在这里的解决方案,其可见性property=IIf(Second(Now())>=48,Second(Now())您希望从60秒的周期移动到100秒的周期 根据现有代码,您可以使用以下内容: =IIf(DateDiff(DateInterval.Second, Today(), Now()) Mod 100 >= 80

我的任务是创建一个显示在电视监视器上的仪表板。此仪表板有5个不同的图表,需要以幻灯片方式显示,也就是说,每次显示一个图表,并在一定时间间隔内旋转到下一个图表


我使用了一个发布在这里的解决方案,其可见性
property=IIf(Second(Now())>=48,Second(Now())您希望从60秒的周期移动到100秒的周期

根据现有代码,您可以使用以下内容:

=IIf(DateDiff(DateInterval.Second, Today(), Now()) Mod 100 >= 80
    AND DateDiff(DateInterval.Second, Today(), Now()) Mod 100 <= 99
  , False
  , True)
=IIf(DateDiff(DateInterval.Second,Today(),Now())Mod 100>=80

DateDiff(DateInterval.Second,Today(),Now())Mod 100我用自定义代码扩展了Ian Preston的解决方案。我基本上想让解决方案完全可扩展

在行可见性表达式中使用此选项:
=code.SubReportHidden(RowNumber(“Tablix1”),CountRows(“Tablix1”),Parameters!ReportRefresh.Value,Now())

这是一个自定义参数,用于动态更改刷新。您还需要在Reports AutoRefresh属性中引用它

Parameters!ReportRefresh.Value
将此添加到您的报告自定义代码:

Public CurrentTimeInSeconds As Long
Private MinCycleRange As Long
Private MaxCycleRange As Long
Private PageCount As Integer
Private Page As Integer
Private FullCycle As Long
Private CurrentTime As DateTime

Public Function SubReportHidden(ByVal page As Integer, ByVal pageCount As Integer, 
  ByVal interval As Long, ByVal now As DateTime) As Boolean

If page.Equals(0) Then Throw New ArgumentOutOfRangeException("page")
If pageCount.Equals(0) Then Throw New ArgumentOutOfRangeException("pageCount")
If interval.Equals(0) Then Throw New ArgumentOutOfRangeException("interval")

Me.PageCount = pageCount
Me.Page = page
FullCycle = interval * pageCount
CurrentTime = now
SetCurrentTimeInSeconds()

SetMaxCycleRange()
SetMinCycleRange()

Dim visable As Boolean = True
If InRange() Then
  visable = False
End If
Return visable
End Function

Private Function InRange() As Boolean
Dim insideRange As Boolean = False
If CycleProgressPercent() > MinCycleRange AndAlso CycleProgressPercent() <= 
  MaxCycleRange Then
  insideRange = True
End If
Return insideRange
End Function

Private Function CycleProgressInSeconds() As Long
  Return CurrentTimeInSeconds Mod FullCycle
End Function

Public Function CycleProgressPercent() As Integer
  Return CInt(CycleProgressInSeconds() / FullCycle * 100)
End Function

Private Sub SetCurrentTimeInSeconds()
  CurrentTimeInSeconds = DateDiff(DateInterval.Second, DateTime.Today, CurrentTime )
End Sub

Private Sub SetMinCycleRange()
  MinCycleRange = CLng(((Page - 1) / PageCount) * 100)
End Sub

Private Sub SetMaxCycleRange()
  MaxCycleRange = CLng(((Page / PageCount) * 100))
End Sub
Public CurrentTimeInSeconds尽可能长
私人碎肉机
专用MaxCycleRange尽可能长
私有页面计数为整数
作为整数的专用页
私人全周期尽可能长
专用CurrentTime作为日期时间
公共函数SubReportHidden(ByVal page为整数,ByVal pageCount为整数,
ByVal间隔长度相同,ByVal现在为DateTime)为布尔值
如果page.Equals(0),则抛出新ArgumentOutOfRangeException(“页面”)
如果pageCount.Equals(0),则抛出新ArgumentOutOfRangeException(“pageCount”)
如果interval.Equals(0),则抛出新的ArgumentOutOfRangeException(“interval”)
Me.PageCount=PageCount
Me.Page=Page
FullCycle=间隔*页面计数
当前时间=现在
SetCurrentTimeInSeconds()
SetMaxCycleRange()
SetMinCycleRange()
Dim visable作为布尔值=真
如果InRange()那么
可视=假
如果结束
返回可视
端函数
作为布尔值的范围()中的私有函数
Dim InsiderAge为布尔值=False

如果CycleProgressPercent()>MinCycleRange,也可以使用CycleProgressPercent()非常感谢你,这非常有效!昨天我在思考模的概念以及如何将其应用于解决方案时遇到了困难-非常感谢你的帮助。伊恩,我正在尝试向这个旋转甲板添加另一个图表-因此我将你的代码改为Mod 120并添加了额外的时间段。但是,对于一些ason Report Builder在将间隔数增加到5个以上时似乎出现故障。也就是说,它将在刷新时显示随机图表,然后不显示图表,然后显示一个图表,以此类推。总体而言,它的功能不正常,一次按顺序显示一个图表,就像我只有Mod 1时那样00和5个时间间隔。你知道为什么我不能让它正常工作吗?