'' *** Add existing DataTable to new DS.
Dim KeyWPrintTable As New DataTable
Dim dsSelected1 As DataSet = New DataSet("KeyWPrintTable")
Try
'' *** Copy KeyWSelectedTable into the new DataTable.
Dim myRows1 = From s In KeyWSelectedTable.AsEnumerable _
Where s.Field(Of Integer)(4) > 1 Or _
s.Field(Of Integer)(5) > 1 Select s
KeyWPrintTable = myRows1.CopyToDataTable
'' myReport1.SetDataSource(dsSelected1)
'' CrystalReportViewer1.ReportSource = myReport1
'' *** Try to get data from grid into report.
DS_fromGrid1 = CType(DataGridViewSelected.DataSource, DataSet)
myReport1.SetDataSource(DS_fromGrid1)
CrystalReportViewer1.ReportSource = myReport1
'' CrystalReportViewer1
The DataTable was created from the input file so I cannot drag anything over into the report.
I created the .rpt file and based it on the schema file DataSet2.xsd. What do I now need to do to get this report to fill with data and print?
myReport1.SetDataSource(DS_fromGrid1) gave an error. Kenneth S.
