Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parameter prompt in crystal 9, vb .net 2002

Status
Not open for further replies.

hsandwick

Programmer
Sep 10, 2001
286
US
How do I prevent the crystal (version 9) default parameter box from showing when I call a simple parameter already defined in the code? Here's the code within the form1_load:

Dim Customername As String
Customername = "Alley Cat Cycles"
Dim paramFields As New ParameterFields()
Dim discreteVal As New ParameterDiscreteValue()
Dim paramField As New ParameterField()

paramField.ParameterFieldName = "?CustomerName"
discreteVal.Value = Customername
paramField.CurrentValues.Add(discreteVal)
paramFields.Add(paramField)

Thanks!
 
I haven't done much development with .Net, but after looking at some sample code (vbnet_win_paramviewer from the samples), the only thing I can suggest is to make sure you're sending the parameter fields to the Viewer control after setting their values:
[tt]
''The collection of parameter fields must be set to the viewer
CrystalReportViewer1.ParameterFieldInfo = paramFields
[/tt]
-dave
 
Dave, Thanks for the feedback. Unfortunately, the parameter box is still appearing, but appreciate your suggestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top