I noticed there are some great tips on here. But most of the ado - crystal reports examples show the following code.
Dim mcstrConnect As ADODB.Connection
dim rs as ADODB.Recordset
Dim Report As New CrystalReport1
Dim strSql As String
Dim strCnn As String
Report.Database.Tables(1).SetLogOnInfo "SEIMS", "ProdTraining", txtUser, txtPass
Set mcstrConnect = New ADODB.Connection
mcstrConnect.Open "Provider=SQEDB.1;Persist Security Info=True;Initial Catalog=ProdTraining;Data Source=SEIMS", txtUser, txtPass
strSql = "Select * from SignUpSheet"
rs.Open strSql, mcstrConnect
Report.Database.SetDataSource rs
CRViewer1.ReportSource = Report
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
With the name of the report being "Report"
When I type Report.Database in VB IDE. I dont get the .Database part.
Do I have crystal installed correctly? I have tried dropping the crystal ocx on my form. I have tried referencing the ocx. I assume
Dim Report As New CrystalReport1
refers to a crystal ocx object dropped onto the form. I am using VB 6.0 with sp4 and crystal reports professional 7.0. I dont see CrystalReport1 in intellisense either. What am I doint wrong?
I do get the following instead:
dim rpt As Crystal.CrystalReport
set rpt = new Crystal.CrystalReport
Thanks in advance for your help
Dim mcstrConnect As ADODB.Connection
dim rs as ADODB.Recordset
Dim Report As New CrystalReport1
Dim strSql As String
Dim strCnn As String
Report.Database.Tables(1).SetLogOnInfo "SEIMS", "ProdTraining", txtUser, txtPass
Set mcstrConnect = New ADODB.Connection
mcstrConnect.Open "Provider=SQEDB.1;Persist Security Info=True;Initial Catalog=ProdTraining;Data Source=SEIMS", txtUser, txtPass
strSql = "Select * from SignUpSheet"
rs.Open strSql, mcstrConnect
Report.Database.SetDataSource rs
CRViewer1.ReportSource = Report
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
With the name of the report being "Report"
When I type Report.Database in VB IDE. I dont get the .Database part.
Do I have crystal installed correctly? I have tried dropping the crystal ocx on my form. I have tried referencing the ocx. I assume
Dim Report As New CrystalReport1
refers to a crystal ocx object dropped onto the form. I am using VB 6.0 with sp4 and crystal reports professional 7.0. I dont see CrystalReport1 in intellisense either. What am I doint wrong?
I do get the following instead:
dim rpt As Crystal.CrystalReport
set rpt = new Crystal.CrystalReport
Thanks in advance for your help