|
-
Oct 16th, 2000, 02:51 AM
#1
Thread Starter
Junior Member
Hi All,
I am using visual basic 6.0(SP3) with crystal reports 4.6. I have created a crystal report using ODBC with a default database "test". It works well. I run the Report from VB and i got the Report Contains Records from database "test". But i want to change the database name to "test1" in runtime and also the Report should contain the records from the changed database "test1". The structure of two databases i mentioned is same. Even i changed the ODBC's default database to "test1" in runtime, i get the Same Report contains Records from database "test". How i can get a set of records from database "test1" in run time? Help immediately. Thanx for any Help.
Sujatha
-
Oct 16th, 2000, 10:38 AM
#2
Lively Member
Originally posted by Sujatha
Hi All,
I am using visual basic 6.0(SP3) with crystal reports 4.6. I have created a crystal report using ODBC with a default database "test". It works well. I run the Report from VB and i got the Report Contains Records from database "test". But i want to change the database name to "test1" in runtime and also the Report should contain the records from the changed database "test1". The structure of two databases i mentioned is same. Even i changed the ODBC's default database to "test1" in runtime, i get the Same Report contains Records from database "test". How i can get a set of records from database "test1" in run time? Help immediately. Thanx for any Help.
Sujatha
Crystal Reports 4.x has been the bane of my existence, I have had tremendous problems with it, but I think that you can solve your problem by openning the report in CR4.x and changing the database to the one that you want to connect to. You will also have to re-build your entire report after you do this. In theory you should be able to change the connection in the CR object on your form in VB, but I was never able to make that work. I have gone to CR7 and have solved some of my problems, but it is by no means a panacea. Anyone who thinks CR is the easiest way to make a portable report has a lot to teach me. Also, you might try refreshing the report data in your vb form before you execute the print command.
Hunter
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|