Help - Crystal Reports will not refresh

Help - Crystal Reports will not refresh

Post by Maurice I. Muonek » Thu, 25 Mar 1999 04:00:00

I used crystal reports designer 6.0 to create a report in VB6.  I moved the
app to another computer and the report failed (the rest of the app works).
Crystal reports expects to find the database in the directory used to create
the report.

How do I tell Crystal Viewer to look for the data in a different location
when I move the app to another computer.

I placed the following code in the load of the form used to open the report.
What I would like it to use is use a table called "Publishers" or a query
called "ReportQuery" in my database.  Any suggestions appreciated.


Dim sDb As Database
Dim QryRpt As QueryDef
Dim dbLocation As String
Dim ReportRecSet As Recordset

dbLocation = App.Path + "\LibraryHOH.MDB"
Set sDb = OpenDatabase(dbLocation)
Set QryRpt = sDb.QueryDefs("ReportQuery")
Set ReportRecSet = QryRpt.OpenRecordset(dbOpenSnapshot)

Report.Database.SetDataSource dbLocation
Report.Database.Tables.Item(1).SetPrivateData 3, ReportRecSet
CRViewer1.ReportSource = Report