I am writing the following code to pass a value to the parameter field. But while running the appl... it asks for the value for the same!!! Why so?
VB Code:
Report = New repProductivity ''Get the collection of parameters from the report crParameterFieldDefinitions = Report.DataDefinition.ParameterFields ''Access the specified parameter from the collection crParameterFieldDefinition = crParameterFieldDefinitions.Item("pTitle") ''Get the current values from the parameter field. At this point ''there are zero values set. crParameterValues = crParameterFieldDefinition.CurrentValues ''Set the current values for the parameter field crParameterDiscreteValue = New ParameterDiscreteValue crParameterDiscreteValue.Value = "My parameter value." ''Add the first current value for the parameter field crParameterValues.Add(crParameterDiscreteValue) ''All current parameter values must be applied for the parameter field. crParameterFieldDefinition.ApplyCurrentValues(crParameterValues) Report.SetDataSource(rsData) CRViewer.ReportSource = Report CRViewer.RefreshReport()




Reply With Quote