Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Reports Question
Message
From
30/08/1999 14:42:21
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00258532
Message ID:
00259310
Views:
21
>Craig,
>
>I finally have this report looking pretty good. The whole reason I used CR to begin with was to create an RTF file that could be e-mailed. I want it to be completly automated, so the user clicks PRINT and it will run the CR report, create the RTF file, and attach it to an e-mail and send it.
>
>Do you know if it is possible to compile a CR report and have it automatically export to RTF without the print dialog displaying? Or should I start over and use automation with Word?
>
>Thanks again.
>
>Rob
>
>

Yup, you can. I use the Automation Server. Here's my code:


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

* Set the Crystal Report options
loCrExportOptions.DestinationType = 1
loCrExportOptions.FormatType = 4
loCrExportOptions.DiskFileName = laAttach[lnAttach]
loCrReport.DiscardSavedData()

* This line will supress the Print dialog in Crystal IF Crystal has
* everything it needs to handle the report.
loCrReport.ParameterPromptingEnabled = .F.

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

* Reset the CR Options
loCrExportOptions.Reset()

* Clear the report objects
loCrReport = .NULL.
loCrDataBase = .NULL.
loExportOptions = .NULL.


After this, I call IDS Mail to send the report.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform