jmerencilla
Programmer
hi. i made a simple crystal report which accepts 2 paramters. however, when i try to run my page, i get this error below. i tried debugging this and i found that although the 2 paramters were added, only the value of the last parameter was reflected on the 2 paramter fields (ie. the 2 paramters now contain the value of the last paramter, including the parameter name!) can somebody here help me? i really need this report or my boss will kill me. thanks.
here's the error:
Missing parameter field current value.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: Missing parameter field current value.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
.
.
.
here's my code:
Protected WithEvents CRptViewer As
CrystalDecisions.Web.CrystalReportViewer
Dim objCRpt As New myCrptReport()
Dim paramFields As New CrystalDecisions.Shared.ParameterFields()
Dim paramField As New CrystalDecisions.Shared.ParameterField()
Dim discreteVal As New CrystalDecisions.Shared.ParameterDiscreteValue()
Dim rangeVal As New CrystalDecisions.Shared.ParameterRangeValue()
With paramField
.ParameterFieldName = "V_PAYGROUP"
discreteVal.Value = "TUESDAY"
.CurrentValues.Add(discreteVal)
paramFields.Add(paramField)
CRptViewer.ParameterFieldInfo = paramFields
.ParameterFieldName = "V_FMNO"
discreteVal.Value = "0004-0000-00002"
.CurrentValues.Add(discreteVal)
paramFields.Add(paramField)
CRptViewer.ParameterFieldInfo.Add(paramFields)
End With
here's the error:
Missing parameter field current value.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: Missing parameter field current value.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
.
.
.
here's my code:
Protected WithEvents CRptViewer As
CrystalDecisions.Web.CrystalReportViewer
Dim objCRpt As New myCrptReport()
Dim paramFields As New CrystalDecisions.Shared.ParameterFields()
Dim paramField As New CrystalDecisions.Shared.ParameterField()
Dim discreteVal As New CrystalDecisions.Shared.ParameterDiscreteValue()
Dim rangeVal As New CrystalDecisions.Shared.ParameterRangeValue()
With paramField
.ParameterFieldName = "V_PAYGROUP"
discreteVal.Value = "TUESDAY"
.CurrentValues.Add(discreteVal)
paramFields.Add(paramField)
CRptViewer.ParameterFieldInfo = paramFields
.ParameterFieldName = "V_FMNO"
discreteVal.Value = "0004-0000-00002"
.CurrentValues.Add(discreteVal)
paramFields.Add(paramField)
CRptViewer.ParameterFieldInfo.Add(paramFields)
End With