cancel
Showing results for 
Search instead for 
Did you mean: 

Applycurrentvalues only shows the first value

Former Member
0 Kudos

Hello,

I have this code:

paciente.cantidad.ForEach(Sub(x)
                               crParameterDiscreteValueCantidad = New ParameterDiscreteValue
                               crParameterDiscreteValueCantidad.Value = x
                               crParameterValuesCantidad.Add(crParameterDiscreteValueCantidad)
                         End Sub)
crParameterFieldDefinitionCantidad.ApplyCurrentValues(crParameterValuesCantidad)

But in the crystal report, it only shows the first value of the array repeated. If there are 5 items, it shows the first one 5 times.

How can I fix this?

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

You are not adding them into a LOV just adding the value 5 times.

See my Parameter test app on the download WIKI page.

Answers (3)

Answers (3)

Former Member
0 Kudos

This is what it says there:

Purpose

The purpose of this document is to provide a quick look-up of all Support Packs, Fixed Issues and Distribution File downloads available for SAP Crystal Reports, developer version for Microsoft Visual Studio.

It doesn't say what I need to do so items will appear without problems, the variable crParameterValuesCantidad has those values when I use Debug, but the fields are populated only with the first item.

The parameter name is "cantidad".

And each field within the report is "cantidad1", "cantidad2", "cantidad3", etc. but instead of populating it with what crParameterValuesCantidad variable has, all are filled with the first item.

0 Kudos
Former Member
0 Kudos

Thank you for answering.

But I couldn't find what I'm looking for, can you tell me where that WIKI is? Or what lines of code should I add?

Thank you!