Help with passing parameters to crystal reports using vb please. I know it might be simple but i am a amateur to this.
Thanks for the solution before hand
(Create the application object and open the report before you do this)
Dim crxParameter As craxdrt.ParameterFieldDefinition
Dim nCounter As Integer
Dim sParam as string
For nCounter = 1 To crxRpt.ParameterFields.Count
'pick off each parameter one by one
Set crxParameter = crxRpt.ParameterFields.Item(nCounter)
'get the parameter name
sParam = crxParameter.ParameterFieldName
'check the parameter name
Select Case UCase$(Trim$(sParam))
Case "USER"
crxParameter.AddCurrentValue sUser
Case "PERIOD", "PER"
crxParameter.AddCurrentValue sPeriod
End Select
Set crxParameter = Nothing
Next
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.