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()