can someone help a newbie with .net
the code i have is working fine to pass one parameter to crystal, can someone help me pass a second parameter called "line"?
Imports System.Windows.Forms
Imports System.Data.SqlClient
Imports OEE_NEW.Module1
Imports System.Data
Imports System.IO
Imports System.Data.SqlTypes
Imports System.Windows.Forms.DataVisualization.Charting
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.ReportSource
Imports CrystalDecisions.Shared
Imports CrystalDecisions.Windows.Forms
Public Class FrmGraphReports
Dim paramFields As New ParameterFields
Dim paramField As New ParameterField
Dim discreteVal As New ParameterDiscreteValue
Private Sub FrmGraphReports_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim rpt As New CrystalReport1() 'The report you created.
Dim myConnection As SqlConnection
Dim MyCommand As New SqlCommand()
Dim myDA As New SqlDataAdapter()
Dim myDS As New DataSet1() 'The DataSet you created.
paramField.ParameterFieldName = "year"
discreteVal.Value = _CRyear
paramField.CurrentValues.Add(discreteVal)
paramFields.Add(paramField)
Try
myConnection = New SqlConnection(connectionstring)
MyCommand.Connection = myConnection
MyCommand.CommandText = "SELECT * from OEEBrakeDown"
MyCommand.CommandType = CommandType.Text
myDA.SelectCommand = MyCommand
myDS.EnforceConstraints = False
myDA.Fill(myDS, "OEEBrakeDown")
rpt.SetDataSource(myDS)
CrystalReportViewer1.ParameterFieldInfo = paramFields
CrystalReportViewer1.ReportSource = rpt
Me.CrystalReportViewer1.Visible = True
Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
End Class