
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