
VB 6.0 and Crystal Reports 6.0
Hello,
I'm using Visual Basic Professional 6.0 and Seagate's Crystal Reports
Professional 6.0
Also, I'm currently using DAO, however I would consider switching to ADO it
that is the only way to solve my problem.
I have set up a 32 bit ODBC Data Source called "RASALES"
I am building an application that allows the user to open up a number of
databases, one at a time. Each database is EXACTLY the same (except for
the data). Same table structure exactly. I would like to create just ONE
Crystal Report report that could be printed by the user, no matter which
database he had open. I figured the best way to do this was to create an
ODBC Data Source, and have the report look at it. That way, when the user
selected a different database, I could just change the ODBC's database to
the one the user just selected. That way, my report would look at the new
database.
My Questions/Problems:
#1 - Is my logic right on this? The best way to do this would be to have a
report that looks at an ODBC Data Source, then when a user opens a different
database, change the ODBC data source to look at the users currently opened
database.
#2 - Can this be done using DAO, or do I have to use the newer ADO? An
example of Visual Basic code on how to change an ODBC data source would be
wonderfull !!!
#3 - When I manually go into ODBC and change the database that "RASALES" is
looking at, and then go back into my Crystal report, the data does NOT
refresh to the new database. Any thoughts on why? I am definitely NOT
saving the data with the report. I've clicked on "refresh report data" and
"verify database" with no luck. Also, assuming I can figure out why this is
not refreshing, is there something I have to do in my VB app to tell the
Crystal Control that the ODBC datasource has changed?
My thanks go out to any kind soul who has taken the time out of his/her busy
day to help me with my questions!!
Dennis