ParameterFields
Can you please help me? I bought Crystal reports for visual studio.Net isbn 1-861100-774-4 I am trying to pass a parameter to my report and it get [ParameterFieldCurrentValueException: Missing parameter field current value.]
[1].[1]F(String , EngineExceptionErrorID
)
[1].[1]B(String
--------------------------------------------------------------------------------
, Int32
--------------------------------------------------------------------------------
)
CrystalDecisions.CrystalReports.Engine.FormatEngin e.internalSetReportInfo(RequestContext reqContext)
CrystalDecisions.CrystalReports.Engine.FormatEngin e.internalGetViewContext(ReportPageRequestContext reqContext, * viewContext)
CrystalDecisions.CrystalReports.Engine.FormatEngin e.GetPage(PageRequestContext reqContext)
CrystalDecisions.ReportSource.LocalReportSourceBas e.GetPage(PageRequestContext pageReqContext)
CrystalDecisions.Web.ReportAgent.u(Boolean
--------------------------------------------------------------------------------
N)
CrystalDecisions.Web.CrystalReportViewer.OnPreRend er(EventArgs e)
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Page.ProcessRequestMain()
Here is my code.
{Command.IDOwner} = {?@Idowner} in .rpt file
Dim myReport As New RptMotorVehicleRegisterReport
CrystalReportViewer1.ReportSource = myReport
' Declare variables needed to pass the parameters
' to the viewer control.
Dim paramFields As New ParameterFields
Dim paramField As New ParameterField
Dim discreteVal As New ParameterDiscreteValue
' Set the name of the parameter field, this must match a
' parameter in the report.
' Set the discreet value to the parameter.
' Set the first discrete value and pass it to the parameter
discreteVal.Value = "4"
paramField.CurrentValues.Add(discreteVal)
paramFields = CrystalReportViewer1.ParameterFieldInfo
paramField.ParameterFieldName = "@Idowner"
myReport.Load()
thank you
Stanley J mroczek
917-968-7093
stan
|