このコードを2つのテーブル結合に使用してDataGridViewに表示しています
Dim strSQL4
strSQL4 = " Select Regno, Sname,Class, Section,SUM(FeeAmount) as FeeAmount FROM FeesMaster WHERE class='" & cboClass.Text & "' GROUP By Regno,Sname,Class,Section"
strSQL5 = " Select Regno, ST_Name,Class, Section,SUM(Amount_Paid) as Amount_Paid FROM Fees_Transaction WHERE class='" & cboClass.Text & "' GROUP By Regno,ST_Name,Class,Section"
Dim DaAp4 As New SqlDataAdapter(strSQL4, con)
Dim DSet4 As New DataTable
DaAp4.Fill(DSet4)
DataGridView2.DataSource = DSet4.DefaultView