Hi all,
I'm a very beginner with Crystal Reports and this may be a simple question to answer. I'm trying to preview a report in the crViewer with this code but everytime it pops up the connection screen to enter my pwd... Is there a way to directly connect to my database without this pop-up?
Thanx
Deulyd
Private Sub Command4_Click()
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Dim CRdb As CRAXDDRT.Database
Dim CRrpt As CRAXDDRT.Report
Set cnn = New ADODB.Connection
cnn.Open "Provider=OraOLEDB.Oracle.1;Password=danielpwd;User ID=daniel;Data Source=Database1;"
' Open the report
Set CRrpt = CRapp.OpenRepor("C:\CRYSTAL_RPTS\user.rpt", 1)
' Set report source and display it in the viewer
crv.ReportSource = CRrpt
crv.ViewReport
End Sub
I'm a very beginner with Crystal Reports and this may be a simple question to answer. I'm trying to preview a report in the crViewer with this code but everytime it pops up the connection screen to enter my pwd... Is there a way to directly connect to my database without this pop-up?
Thanx
Deulyd
Private Sub Command4_Click()
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Dim CRdb As CRAXDDRT.Database
Dim CRrpt As CRAXDDRT.Report
Set cnn = New ADODB.Connection
cnn.Open "Provider=OraOLEDB.Oracle.1;Password=danielpwd;User ID=daniel;Data Source=Database1;"
' Open the report
Set CRrpt = CRapp.OpenRepor("C:\CRYSTAL_RPTS\user.rpt", 1)
' Set report source and display it in the viewer
crv.ReportSource = CRrpt
crv.ViewReport
End Sub