Avatar of myerit
myerit
 asked on

VB Report Designer Group Header

I am attempting to create a report using VB6 and the report designer to create an inventory transaction log report.  I have two tables (TransactionLogMaster and TransactionLogDetails).  TransactionLogMaster contains the transaction date, transaction type, vendor name and a unique transaction id.  TransactionLogDetails contains the specifics of the transaction, description of item, price, quantity ordered or received.

I have a query that joins all that into a dataset.  I have created the report with a group header.  I want the Transaction type, date and vendor name to appear in the header with everything else appearing in the details.  However, when I try to print the report, I get run-time error '8570' report sections do not match data source.

Does this have something to do with grouping or is it another issue?

Thanks
Visual Basic Classic

Avatar of undefined
Last Comment
bmatumbura

8/22/2022 - Mon
JR2003

You need to have a hierachical recordset using an MSDataShape connection.
The simplest way to get it to work is to include a data environment in your project and build the sql in there. This will generate the correct grammer for a shape query.
JR
myerit

ASKER
JR2003,

When attempting to create the MSDataShape connection, what are the data source and location?  Is this referring to the database name (Mydata.mdb)?  
JR2003

oConn.Open "Provider=MSDataShape;" & _
           "Data Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Dbq=c:\somepath\Mydata.mdb;" & _
           "User ID=myUsername;" & _
           "Password=myPassword"

 
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
JR2003

myerit
For Access use the Microsoft.Jet.OLEDB.4.0 Provider
In the connection just put the filename including the full path.
JR
ASKER CERTIFIED SOLUTION
jkwasson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
bmatumbura