Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do work DataReport of VB6.0
Message
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00246522
Message ID:
00246690
Views:
43
>In my applicaiton I like to do a simple report. For the first time I am looking at the DataReport of VB6.0 and I have problem making it work.
>
>My data is in a .MDB. I set the DataSource to c:\myapp\mydata.mdb. When I right click on the report and do restore structure I get a error.
>
>In the documendation we found only information on ADO so can I use direcly my MDB in the DataReport?

To use the Data Report, you need an ADO data source and Access is a valid provider to work with ADO.

There is a couple of ways to open an ADO connection:

1- You can use the Data Environment to create a Connection to your database and then you create commands that will retrieve fields for your report. This way you will be able to drag & drop fields from the Data Environment to your data report. Easy no?

2- You can also programmatically open a connection and set a recordset to the report DataSource property like this:
Set DataReport1.DataSource = rsYourValidRecordset

There is still some bugs with the DataReport (like you will hardly be able to print landscape).
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform