Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to generate a crystal report directly to file
Message
From
28/02/2000 10:46:18
 
 
To
28/02/2000 09:08:38
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00338365
Message ID:
00338441
Views:
12
>how to generate a crystal report directly to file without being prompted and preview.

This code sends to and RTF:


loCRApp = CREATEOBJECT("Crystal.CRPE.Application")

* Call crystal reports to create the Agency report
loCrReport = loCRApp.OpenReport("C:\Work\AgLeads3.Rpt")
loCrDatabase = loCrReport.Database()
loCrExportOptions = loCrReport.ExportOptions()

* Set the Crystal Report options
loCrExportOptions.DestinationType = 1
loCrExportOptions.FormatType = 4
loCrExportOptions.DiskFileName = "Agent.RTF"
loCrReport.DiscardSavedData()
loCrReport.ParameterPromptingEnabled = .F.

* Create the RTF file
loCrReport.Export(.F.)

* Reset the CR Options
loCrExportOptions.Reset()
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform