I am using code to design a report in
VB 6. But I cannot group the items into subgroups/sections. How do I group the items using code. Below is the sample of my detailed report coding.
If report = "localsum" Then
ssql = "select b.BankName, a.clearing_section, a.clearing_date, count(*) as tnum, sum(a.amount) as tamount from clearing_capture a, BankMaster b Where Left(a.paying_bank_routing_no, 3) = Left(b.BankRoutingNumber, 3) and mid(a.paying_bank_routing_no,4,2) = mid(b.BankRoutingNumber,4,2) and a.clearing_section = '" & Combo1.Text & "' and a.clearing_date between #" & startdate & "# and #" & enddate & "# group by b.BankName, a.clearing_section,a.clearing_date order by b.BankName"
Set adoRecord = New Recordset
connect
adoRecord.Open ssql, conn, adOpenStatic, adLockOptimistic
Set localsum.DataSource = adoRecord
localsum.Show