Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 18th, 2005, 06:49 AM
Registered User
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Grouping Header/Footer in VB 6 Report Design

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
     adoRecord.Open ssql, conn, adOpenStatic, adLockOptimistic
     Set localsum.DataSource = adoRecord

Old February 18th, 2005, 09:29 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi

hi there..

i cannot find anything wrong on the sql.. can you run that sql on your database to get an extended error???



Similar Threads
Thread Thread Starter Forum Replies Last Post
header footer zaman1111 JSP Basics 0 July 28th, 2005 05:00 PM
addin a header and footer rom XSLT 0 July 28th, 2005 03:24 AM
can footer value show in header? yancyn Crystal Reports 0 August 5th, 2004 01:39 AM
Print multiple header & footer from Crystal Report ashu_gupta75 Classic ASP Professional 0 February 6th, 2004 03:44 AM
Print A4 sheets of a report with Header and Footer ashu_gupta75 Classic ASP Basics 0 January 5th, 2004 07:25 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.