My reprot has week parameter where user can select more than one week (multiple weeks can be entered), i wrote the below code,
Dim crParameterDiscreteValue As ParameterDiscreteValue
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldLocation As ParameterFieldDefinition
Dim crParameterValues As ParameterValues
Dim crParameterFieldDefinition As ParameterFieldDefinition
crParameterFieldDefinitions = cryrpt.DataDefinition.ParameterFields
crParameterFieldDefinition = crParameterFieldDefinitions("Week")
crParameterValues = crParameterFieldDefinition.CurrentValues
crParameterDiscreteValue = New ParameterDiscreteValue()
crParameterDiscreteValue.Value = "18" '1st current value
crParameterValues.Add(crParameterDiscreteValue)
'crParameterDiscreteValue = Nothing
crParameterDiscreteValue = New ParameterDiscreteValue()
crParameterDiscreteValue.Value = "17" '2nd current value
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
'crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
But the report is showing only records in week 17 only. whatever value i am assigning in the last it is only getting passed. Can anyone please help me?
Dim crParameterDiscreteValue As ParameterDiscreteValue
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldLocation As ParameterFieldDefinition
Dim crParameterValues As ParameterValues
Dim crParameterFieldDefinition As ParameterFieldDefinition
crParameterFieldDefinitions = cryrpt.DataDefinition.ParameterFields
crParameterFieldDefinition = crParameterFieldDefinitions("Week")
crParameterValues = crParameterFieldDefinition.CurrentValues
crParameterDiscreteValue = New ParameterDiscreteValue()
crParameterDiscreteValue.Value = "18" '1st current value
crParameterValues.Add(crParameterDiscreteValue)
'crParameterDiscreteValue = Nothing
crParameterDiscreteValue = New ParameterDiscreteValue()
crParameterDiscreteValue.Value = "17" '2nd current value
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
'crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
But the report is showing only records in week 17 only. whatever value i am assigning in the last it is only getting passed. Can anyone please help me?