Private rpt As ReportDocument
Protected Sub Page_Load(sender As Object, e As EventArgs)
rptCrystal.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None
rpt = New ReportDocument()
rpt.Load(Server.MapPath("report.rpt"))
rpt.SetParameterValue("sParameters", "Value")
Me.rptCrystal.ReportSource = rpt
End Sub
Protected Overrides Sub OnUnload(e As EventArgs)
MyBase.OnUnload(e)
rpt.Close()
rpt.Dispose()
GC.Collect()
End Sub
และหลังจาก Deploy ใหม่ลอง Test ไป 100 กว่าฉบับ ถือว่าผ่านไปด้วยดี