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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing a simple parameter problem

Status
Not open for further replies.

sand133

Programmer
Jun 26, 2004
103
GB
here is the code, i have set up my report to accept an employeeid parameter. the user enters a employeeid and hits the button, and a corresponding report should appear. all this is done in a win form, however nuthing happens,

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Windows.Forms
Imports CrystalDecisions.Shared

Public Class Form1
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myparameterfields As New parameterfields()
Dim myparameterField As New ParameterField()
Dim mydiscretevalue As New parameterDiscreteValue()

myparameterField.ParameterFieldName = "employeeid"
mydiscretevalue.Value = TextBox1.Text
myparameterField.CurrentValues.add(mydiscretevalue)

myparameterfields.add(myparameterField)

CrystalReportViewer1.ParameterFieldInfo = myparameterfields
CrystalReportViewer1.Refresh()


End Sub
End Class


thanks!!!!
 
oh by the way guys i get the generic (default) parameter window poping up when i run my application which is annoying becuase i want to send the parameter through my own win form.


many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top