Link to home
Start Free TrialLog in
Avatar of ako74
ako74Flag for Norway

asked on

SQL-code for Subtotals in VB DataReport

Hi, I have a single table in Access from which I want to do subtotals using sql in DataReport (VB6). How do I write the sql-code?
Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

You would normally do the sub-totals in the report itself, not in the sql for the report.  Sub-totals in SQL can be very messy.

The VB6 Report generator makes it very easy to add sub-totals for each major category in your report.

AW
Avatar of ako74

ASKER

As I understand it, obtaining sub-totals in the report is easy when you have a parent-child structure in the database. But in my case I happen to have a single table, i.e. only one table with no relationship. In such a case I have found no method in VB6's DataReport for sub-totals. If you know of any I would be glad to learn the details.
what field do you want to sub-total on?  What is the table structure.

AW
ASKER CERTIFIED SOLUTION
Avatar of Markus Fischer
Markus Fischer
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ako74

ASKER

Thanks, it helped. - As a mattter of fact it solved my problem.
The parent-child relationship which should have been done in the database is in this way done or simulated in the DataReport.