);

How pass data to crystal Report

With ReportViewerSale
Dim rpt_Document As New ReportDocument
Dim ParamCollection As New CrystalDecisions.Shared.ParameterValues
rpt_Document.Load(Application.StartupPath & “\Reports\GSTBill-Half.rpt”) ‘ RPT put in bin folder.
Dim My_Connection As SqlConnection
Dim my_Command As New SqlCommand
Dim my_DataAdapter As New SqlDataAdapter
Dim my_DataSource As New dsBillingSoft ‘XSD file Name here
Dim ds As DataSet = New DataSet
My_Connection = New SqlConnection(CnString)
my_Command.CommandText = “Here Query”
my_Command.Connection = My_Connection
my_Command.CommandType = CommandType.Text
my_DataAdapter.SelectCommand = my_Command
my_DataAdapter.Fill(my_DataSource, “dtSale”) ‘ Data table name Here
rpt_Document.SetDataSource(my_DataSource)

‘ParamCollection.Add(crpSharedString)
‘rpt_Document.DataDefinition.ParameterFields(“SharedDate”).ApplyCurrentValues(ParamCollection)

.CrystalReportViewer1.ReportSource = rpt_Document
.Show()
End With