📄 studentservice.asmx.vb
字号:
Imports System
Imports System.Web.Services
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.ReportSource
Imports CrystalDecisions.Web.Services
< WebService( Namespace:="http://crystaldecisions.com/reportwebservice/9.1/" ) > _
Public Class StudentService
Inherits ReportServiceBase
Public Sub New()
Me.ReportSource = New CachedWebStudent(Me)
End Sub
Protected Sub OnInitReport(ByVal source As Object, ByVal args As EventArgs)
End Sub
Public Class CachedWebStudent
Implements ICachedReport
Protected webService As StudentService
Public Sub New(ByVal webServiceParam As StudentService)
Me.webService = webServiceParam
End Sub
Public Overridable Property IsCacheable() As Boolean _
Implements ICachedReport.IsCacheable
Get
Return True
End Get
Set(ByVal Value As Boolean)
End Set
End Property
Public Overridable Property ShareDBLogonInfo() As Boolean _
Implements ICachedReport.ShareDBLogonInfo
Get
Return False
End Get
Set(ByVal Value As Boolean)
End Set
End Property
Public Overridable Property CacheTimeOut() As TimeSpan _
Implements ICachedReport.CacheTimeOut
Get
Return (CachedReportConstants.DEFAULT_TIMEOUT)
End Get
Set(ByVal Value As TimeSpan)
End Set
End Property
Protected Overridable Function CreateReport() As ReportDocument _
Implements ICachedReport.CreateReport
Dim report As Student = New Student()
AddHandler report.InitReport, New EventHandler(AddressOf Me.webService.OnInitReport)
Return report
End Function
Public Overridable Function GetCustomizedCacheKey(ByVal request As RequestContext) As String _
Implements ICachedReport.GetCustomizedCacheKey
Dim key As String = Nothing
' key = RequestContext.BuildCompleteCacheKey(Nothing, Nothing, Me.GetType(), Me.ShareDBLogonInfo)
Return key
End Function
End Class 'CachedWebStudent
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -