Changing Database\Table locations at run-time from VB6 
Author Message
 Changing Database\Table locations at run-time from VB6

Here is an example:

I have a simple report with 3 tables (Btrieve).  I also have two different
databases.  I would like to have a program that will enable the user to
choose the database and report they wish to run.  Needless to say the report
may have to point to a different database depending upon the users
selection.  I am able to redirect the first table but I am unable to change
any others.  To take it a step further this will eventually have to run on
some extremely complex reports (up to 14 sub-reports).  Seagate says it is
not possible but I figure since I can change the first table of any report
there must be a way to change all of the other table locations.

Help me!

Troy Young



Mon, 18 Feb 2002 03:00:00 GMT  
 Changing Database\Table locations at run-time from VB6
You can do it (I think) with the automation server of crystal
(CPEAUT32.dll)

    Dim reportdb As CRPEAuto.Database
    Dim reporttables As CRPEAuto.DatabaseTables
    Dim reporttable As CRPEAuto.DatabaseTable

        Set reportdb = report.Database
        Set reporttables = reportdb.Tables

        Set reporttable = reporttables(1)
        reporttable.location = ....

        Set reporttable = reporttables(2)
        reporttable.location = ....

        Set reporttable = reporttables(3)
        reporttable.location = ....


says...

Quote:
> Here is an example:

> I have a simple report with 3 tables (Btrieve).  I also have two different
> databases.  I would like to have a program that will enable the user to
> choose the database and report they wish to run.  Needless to say the report
> may have to point to a different database depending upon the users
> selection.  I am able to redirect the first table but I am unable to change
> any others.  To take it a step further this will eventually have to run on
> some extremely complex reports (up to 14 sub-reports).  Seagate says it is
> not possible but I figure since I can change the first table of any report
> there must be a way to change all of the other table locations.

> Help me!

> Troy Young



Mon, 18 Feb 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CR9 does not change table location at run time

2. How to change Database location at run time

3. Changing database location at run-time

4. Changing database location at run time

5. Change Database Location at run-time

6. Run Time Change of DB Location, Setting Passwords, and Rpt Location

7. ADO Data Control - Design Time/Run Time database locations

8. Changing Access mdb location in run time

9. Change TTX location at Run-Time - Please Help....

10. How can I set the table location from VB6 to a subreports in runtime

11. Setting a database location at run time?

12. URGENT-CR6/VB6 vbx bug with .DATAFILES-changing database location

 

 
Powered by phpBB® Forum Software