RE:Conectar una base con Crystal 9
Publicado por
Carrasco (1 intervención) el 04/08/2003 20:57:47
Espero que este pequeño ejemplo te sirva...
‘Declare the application object used to open the rpt file.
Dim crxApplication As New CRAXDRT.Application
‘Declare the report object
Public Report As CRAXDRT.Report
Private Sub Form_Load()
‘Declare a DatabaseTable Object
Dim crxDatabaseTable as craxdrt.DatabaseTable
‘Declare a Report object to set to the subeport
Dim crxSubreport As CRAXDRT.Report
‘Open the report
Set Report = crxApplication.OpenReport _(App.Path & “\OCX_to_RDC.rpt", 1)
‘Use a For Each loop to change the location of each
‘DatabaseTable in the Reports DatabaseTable Collection
For Each crxDatabaseTable In Report.Database.Tables
crxDatabaseTable.ConnectionProperties(“Database Name”) = App.Path & “\xtreme.mdb"
Next crxDatabaseTable