Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VBA to automatically refresh Crystal Reports

Status
Not open for further replies.

hmohrmann

IS-IT--Management
Feb 6, 2001
18
0
0
US
I am currently using VBA in Access 2000 to loop through a list of reports in the database and automatically refresh the data in the report. All our reports are in Crystal Reports Version 7. The process works fine if the PC running the program has Version 7 installed. If version 8 is installed then all the reports are upgraded to version 8.
Is there a way in version 8 to tell the engine to save in version 7.
Here is the code that I am using:
Dim crpApplication As CRPEAuto.Application
Dim crpReport As CRPEAuto.Report
Set crpApplication = CreateObject("Crystal.CRPE.Application")
Set crpReport = crpApplication.OpenReport(strStartDirectory & "\" & Rs!ReportName)
crpReport.DiscardSavedData
crpReport.ExportOptions.DiskFileName = strEndDirectory & "\" & Rs!ReportName
crpReport.ExportOptions.DestinationType = crEDTDiskFile
crpReport.ExportOptions.FormatType crEFTCrystalReport
crpReport.Export (False)

Thanks
Harry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top