Hi,
I´m using Crystal Reports 8.0 OCX in my VB 6.0 application.
I have this code:
CrystalReport1.Connect = GBL_connString
CrystalReport1.ReportFileName= "S:\AdmProp\Nova_Aplic\Reports\Orcam2.rpt"
CrystalReport1.WindowShowGroupTree = False
CrystalReport1.WindowState = crptMaximized
CrystalReport1.WindowMaxButton = True
CrystalReport1.WindowControlBox = False
CrystalReport1.WindowShowCloseBtn = True
CrystalReport1.Formulas(0) = ("Ano= '" & a & "'"
CrystalReport1.Destination = crptToWindow
CrystalReport1.Action = 1
I´m trying to get the report into the screen, however, I get this error message: "cannot open Sql Server"
Note: GBL_connString = "Provider = sqloledb.1;Data Source = saglobaladp01;Initial catalog = AdmProp;user id = admprop;password = admpropprod" --> and this connection is working fine!
So, it seems that I´m doing something wrong... I thought that I should use the "connect" property but it seems not to work
Any help is appreciate.
Thank you
Sergio Oliveira
I´m using Crystal Reports 8.0 OCX in my VB 6.0 application.
I have this code:
CrystalReport1.Connect = GBL_connString
CrystalReport1.ReportFileName= "S:\AdmProp\Nova_Aplic\Reports\Orcam2.rpt"
CrystalReport1.WindowShowGroupTree = False
CrystalReport1.WindowState = crptMaximized
CrystalReport1.WindowMaxButton = True
CrystalReport1.WindowControlBox = False
CrystalReport1.WindowShowCloseBtn = True
CrystalReport1.Formulas(0) = ("Ano= '" & a & "'"
CrystalReport1.Destination = crptToWindow
CrystalReport1.Action = 1
I´m trying to get the report into the screen, however, I get this error message: "cannot open Sql Server"
Note: GBL_connString = "Provider = sqloledb.1;Data Source = saglobaladp01;Initial catalog = AdmProp;user id = admprop;password = admpropprod" --> and this connection is working fine!
So, it seems that I´m doing something wrong... I thought that I should use the "connect" property but it seems not to work
Any help is appreciate.
Thank you
Sergio Oliveira