Change database for crystal report at runtime 
Author Message
 Change database for crystal report at runtime

Hi,
I've used a crystal custom control in VB4 (16-bit). I've try to set the
value of the datafile property for changing the database of the report at
runtime, however it does not work.
Does anybody knows how to change to another database for Crystal Report
(3.0) during run time.

Thanks in advance
Best Wish
Carrie Wong



Sun, 04 Jun 2000 03:00:00 GMT  
 Change database for crystal report at runtime

I've accomplished something similar using VB5 and the Crystal OCX:

    'CrystalReport1 is an instance of the Crystal OCX.
    CrystalReport1.DataFiles(0) = txtInputFile
    CrystalReport1.DataFiles(1) = "d:\data.db"
    CrystalReport1.DataFiles(2) = txtInputFile
    ' ORDER of the DataFiles is very important!

Note that the order of databases can be determined by going to "Set Location"
from the Database menu.  Also, if your report has subreports things get a
little bit tricky.  You have to open each subreport, and set it's DataFiles
property as well.  For what I needed, I abandoned VB5 and wrote the
application in VC++ 4.2 using the Crystal MFC classes and DLLs.

Quote:

> Hi,
> I've used a crystal custom control in VB4 (16-bit). I've try to set the
> value of the datafile property for changing the database of the report at
> runtime, however it does not work.
> Does anybody knows how to change to another database for crystal report
> (3.0) during run time.



Fri, 16 Jun 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Changing Crystal Report database location at runtime

2. Changing sort on Crystal Reports at runtime -- How?

3. Change SQL for Crystal Reports at runtime

4. changing data source in crystal report @ runtime

5. Crystal Reports - Changing Access Tables at runtime

6. changing db location in ODBC for Crystal Report at runtime

7. Crystal Report - changing datasource at runtime

8. Change SQL for Crystal Reports at runtime

9. How can i change picture in Crystal report at runtime

10. Change Formulas Font at runtime in Crystal Report

11. Changing Datasource at runtime - Crystal Reports v4.5

12. changing db location in ODBC for Crystal Report at runtime

 

 
Powered by phpBB® Forum Software