高手帮忙,水晶报表显示在网页上的内容不更新,在线等,TKS!
我新建个网站,加入一个CrystalReportViewer1,然后填加下面代码,其它的什么也不做,但运行后只显示做水晶报表时的数据记录在网页上,即使更改参数的值再运行,也是这样,即参数没有传进去。
请问高手为什么啊?
下面的代码是用来打开c:\a\IndentedCurrentBillOfMaterial.rpt报表,加入了参数和登录信息
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim logOnInfo As New TableLogOnInfo
Dim oRpt As New ReportDocument
Dim i As Int16
Dim tmp As DBNull
oRpt.Load( "c:\a\IndentedCurrentBillOfMaterial.rpt ")
For i = 0 To oRpt.Database.Tables.Count - 1
logOnInfo.ConnectionInfo.UserID = "sa "
logOnInfo.ConnectionInfo.ServerName = "it-zmyang "
logOnInfo.ConnectionInfo.DatabaseName = "TESTDB1_APP "
logOnInfo.ConnectionInfo.Password = "forex "
oRpt.Database.Tables(0).ApplyLogOnInfo(logOnInfo)
Next
'CrystalReportViewer1.ReportSource = oRpt
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
Dim paramFields As New ParameterFields
Dim paramField As New ParameterField
Dim discreteVal As New ParameterDiscreteValue
Dim rangeVal As New ParameterRangeValue
' 第一个参数是具有多个值的离散参数。
' 设置参数字段的名称,它必须
'和报表中的参数相符。
paramField.ParameterFieldName = "@StartingItem "
' 设置第一个离散值并将其传