Dim strSQL2 As String = "SELECT [FeesType] FROM FeeMaster WHERE Class='" & cboClass.Text & "'" Dim DaAp2 As New SqlDataAdapter(strSQL2, con) Dim Dset2 As New DataTable DaAp27.Fill(Dset2) Dim VF For i = 0 To Dset2.Rows.Count - 1 VF = Dset2.Rows(i).Item("FeesType") Next Dim strSQL1 As String strSQL1 = "SELECT * FROM (SELECT SA.Regno, SA.Sname, SA.Class, SA.Section , FT.FeeType," & _ " FT.Amount_Paid FROM Fees_Transaction as FT INNER JOIN stdAdmission as SA ON FT.Regno=SA.Regno) FeeMaster" & _ " PIVOT (Sum(Amount_Paid) for FeeType in ( ' + VF ' + ))as PVT where Class='" & cboClass.Text & "'" Dim DaAp1 As New SqlDataAdapter(strSQL1, con) Dim DSet1 As New DataTable DaAp1.Fill(DSet1) DGV1.DataSource = DSet1
" PIVOT (Sum(Amount_Paid) for FeeType in ( '" & VF & "' ))as PVT where Class='" &
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)