I am using Crystal Reports ver. 8, Visual Basic 6, MS Access 97 and my data connections and etc are ADO.
I currently am using a direct connection to the database via: strConnection = "Driver={Microsoft Access Driver (*.mdb)};Dbq=Z:\database.MDB"
When I attempt to use the CRviewer code in the help file:
Dim CurrentReport As New dsrReport2275 'crystal rpt designer DD-2275 (data source is ADO)
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CurrentReport.Database.SetDataSource rsFundDocs 'recordset should be populated
rsFundDocs.MoveFirst 'move to first rec
CurrentReport.ReadRecords 'read it in to rpt
CRViewer1.EnableRefreshButton = True
CRViewer1.ReportSource = CurrentReport
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
it dies out....
as I was perusing the forum I came across the following code
from a fowlerconsult:
Private Sub Form_Load()
Dim oApp As New CRPEAuto.Application
Dim oRpt As CRPEAuto.Report
Set oRpt = oApp.OpenReport("Z:\test.rpt", 1)
oRpt.Preview
End sub
which also fails (shows for a brief moment - then goes away)
After cruising the Seagate web site I came across the fact that changing the datasource at runtime can crash VB (Article ID: c2006592) if you are using VB6 with SP3. The fix is to install SP4 from Microsoft. I am now in the process of upgrading to SP4.
Ah... the question(s) finally.
1. What is/are the best connection method(s) for a database when implementing MS Access 97 and Crystal in a VB6 ADO application. (eg, Jet 4.0, OLE ODBC, etc)?
2. Is it better to create a crystal report with the external standalone editor (using a defined ado data source) and then implement it into you app or to build it inside the app with the designer? I would prefer to use the standalone as I can then hand a set of criteria to an individual and they can build the report w/o needing VB.
3. Once a report is completed can it then be encapsulated in a "self" executing file to send to an outside source that doesn't have access to my data - and do I have to hand them a subset of data (keeping in my mind, I have constructed this with ado data sources)?
I currently am using a direct connection to the database via: strConnection = "Driver={Microsoft Access Driver (*.mdb)};Dbq=Z:\database.MDB"
When I attempt to use the CRviewer code in the help file:
Dim CurrentReport As New dsrReport2275 'crystal rpt designer DD-2275 (data source is ADO)
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CurrentReport.Database.SetDataSource rsFundDocs 'recordset should be populated
rsFundDocs.MoveFirst 'move to first rec
CurrentReport.ReadRecords 'read it in to rpt
CRViewer1.EnableRefreshButton = True
CRViewer1.ReportSource = CurrentReport
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
it dies out....
as I was perusing the forum I came across the following code
from a fowlerconsult:
Private Sub Form_Load()
Dim oApp As New CRPEAuto.Application
Dim oRpt As CRPEAuto.Report
Set oRpt = oApp.OpenReport("Z:\test.rpt", 1)
oRpt.Preview
End sub
which also fails (shows for a brief moment - then goes away)
After cruising the Seagate web site I came across the fact that changing the datasource at runtime can crash VB (Article ID: c2006592) if you are using VB6 with SP3. The fix is to install SP4 from Microsoft. I am now in the process of upgrading to SP4.
Ah... the question(s) finally.
1. What is/are the best connection method(s) for a database when implementing MS Access 97 and Crystal in a VB6 ADO application. (eg, Jet 4.0, OLE ODBC, etc)?
2. Is it better to create a crystal report with the external standalone editor (using a defined ado data source) and then implement it into you app or to build it inside the app with the designer? I would prefer to use the standalone as I can then hand a set of criteria to an individual and they can build the report w/o needing VB.
3. Once a report is completed can it then be encapsulated in a "self" executing file to send to an outside source that doesn't have access to my data - and do I have to hand them a subset of data (keeping in my mind, I have constructed this with ado data sources)?