T
the_kiddie98
Hi Guys,
I was brought in at the last moment to try to get a project
completed. it's vb.net and crystal reports.
Here's the problem
I can populate a parameter list for a report so the user can choose
one / all Suppliers. When a parameter option from the combo box is
clicked that came from the database (see code below) the combo box
closes but the option is not selected. I have tried every type of case
I know but still nothing works. the killer is that I have done this
with a test project and it works fine. I can't see any difference
though.
-- code removed
Dim dataReader As SqlDataReader
dataReader =
cmdSuppliers.ExecuteReader(CommandBehavior.CloseConnection)
Dim SuppName As String
While dataReader.Read
discreteParam = New ParameterDiscreteValue
SuppName = dataReader.GetString(0)
discreteParam.Value = SuppName & " "
MessageBox.Show(SuppName)
defaultValues = paramField.DefaultValues
defaultValues.Add(discreteParam)
' Apply the default parameter values.
paramField.ApplyDefaultValues(defaultValues)
End While
discreteParam = New ParameterDiscreteValue
discreteParam.Value = "test"
defaultValues = paramField.DefaultValues
defaultValues.Add(discreteParam)
' Apply the default parameter values.
paramField.ApplyDefaultValues(defaultValues)
if there are any omissions it's in the copy as the report compiles
fine. "Test" is displayed no problems but any value from the database
isn't.
Any help or suggestions would be greatly appreciated.
Best regards,
john
I was brought in at the last moment to try to get a project
completed. it's vb.net and crystal reports.
Here's the problem
I can populate a parameter list for a report so the user can choose
one / all Suppliers. When a parameter option from the combo box is
clicked that came from the database (see code below) the combo box
closes but the option is not selected. I have tried every type of case
I know but still nothing works. the killer is that I have done this
with a test project and it works fine. I can't see any difference
though.
-- code removed
Dim dataReader As SqlDataReader
dataReader =
cmdSuppliers.ExecuteReader(CommandBehavior.CloseConnection)
Dim SuppName As String
While dataReader.Read
discreteParam = New ParameterDiscreteValue
SuppName = dataReader.GetString(0)
discreteParam.Value = SuppName & " "
MessageBox.Show(SuppName)
defaultValues = paramField.DefaultValues
defaultValues.Add(discreteParam)
' Apply the default parameter values.
paramField.ApplyDefaultValues(defaultValues)
End While
discreteParam = New ParameterDiscreteValue
discreteParam.Value = "test"
defaultValues = paramField.DefaultValues
defaultValues.Add(discreteParam)
' Apply the default parameter values.
paramField.ApplyDefaultValues(defaultValues)
if there are any omissions it's in the copy as the report compiles
fine. "Test" is displayed no problems but any value from the database
isn't.
Any help or suggestions would be greatly appreciated.
Best regards,
john