SAP Knowledge Base Article - Public

1202315 - How do I get a parameters default value's description via the NET SDK?


When pulling out the default parameter values from a parameter using the .NET SDK, how do you get the description associated with it?




The following code pulls the value and the description from the first parameter's first default value:
imports CrystalDecisions.CrystalReports.Engine
imports CrystalDecisions.Shared
Dim crRpt as new CrystalReport1
Dim ParamFieldDefs as ParameterFieldDefinitions
Dim ParamFieldDef as ParameterFieldDefinition
Dim ParamDiscreteValue as ParameterDiscreteValue
ParamFieldDefs = crRpt.DataDefinition.ParameterFields
ParamFieldDef = ParamFieldDefs.Item(0)
ParamDiscreteValue = ParamFieldDef.DefaultValues.Item(0) Dim value as string = ParamDiscreteValue.Value
Dim desc as string = ParamDiscreteValue.Description


NET description parameter default value XI R2 Release 2 , 6086916 , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , How To


SAP Crystal Reports, developer version for Microsoft Visual Studio ; SAP Crystal Reports, version for Visual Studio .NET 2008