Does anyone know how to pass a value to a parameter in Crystal from VB.NET? There seems to be all sorts of discrete parameters, ranges, and multiple default values.
Use the Report objects, ParameterFieldDefinitions collection to manipulate the parameters. As with formulas, there is one ParameterFieldDefinition object in the collection for each parameter field defined in the report. And like formulas, the proper memeber of the collection is retrieved with a one-based index determined by the order in which the parameter fields were added to the report
(IF you were to use) The RDC (Report Designer Component) approach for setting the value of a parameter field being passed to a report is to use the ParameterFieldDefinition object's AddCurrentValue method. This passes a single value to the report parameter field. Crystal Reports 8.5 allows multiple-value parameter fields, so you can execute the AddCurrentValue method as many times as necessary. (for example, in a loop that looks though a list box for selected items) to populate a parameter field with several values.
Using the VB interface enter the following code:
'Set parameter value
Report.Parametefields(1).AddCurrentValue (5)
End
Sorry if this is longwinded, I was trying to educate myself as well
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.