Dim MyCommand As New SqlCommand() Dim myDA As New SqlDataAdapter() Dim myDS As New AGprint() 'The DataSet you created. Try MyCommand.Connection = cn MyCommand.CommandText = "SELECT * FROM actualguesting where foilionum=" + mainForm.folioid MyCommand.CommandType = CommandType.Text myDA.SelectCommand = MyCommand myDA.Fill(myDS, "actualguesting") MyCommand = New SqlCommand myDA = New SqlDataAdapter MyCommand.Connection = cn MyCommand.CommandText = "SELECT * FROM AGtransactions where foilionum=" + mainForm.folioid MyCommand.CommandType = CommandType.Text myDA.SelectCommand = MyCommand myDA.Fill(myDS, "AGtransactions") myDS.EnforceConstraints = False Dim rpt As New AGprintreceiptDC() 'The report you created. rpt.SetDataSource(myDS) CrystalReportViewer1.ReportSource = rpt
Dim MyCommand As New SqlCommand() Dim myDA As New SqlDataAdapter() Dim myDS As New AGprint() 'The DataSet you created. Try MyCommand.Connection = cn MyCommand.CommandText = "SELECT * FROM actualguesting where foilionum=" + mainForm.folioid MyCommand.CommandType = CommandType.Text myDA.SelectCommand = MyCommand myDA.Fill(myDS, "actualguesting") myDS.EnforceConstraints = False Dim rpt As New AGprintreceiptDC() 'The report you created. rpt.SetDataSource(myDS) CrystalReportViewer1.ReportSource = rpt
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)