Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Reports
Message
From
30/09/1998 10:55:09
 
 
To
30/09/1998 03:18:22
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00141275
Message ID:
00142399
Views:
27
>Hi Mr Berntson,
>
>Now I am using CR Crystal 32 OCX in VFP. I have successfully installed the OCX in VFP. The question is how I can create the OLE object use CREATEOBJECT() in VFP code. Could you please please give me some advice.
>
>Thanks a lot.
>Bin
>
>
>


You drop the Crystal OCX on a form, set its properties. Here's some of the code I use.


WITH ThisForm
* Set the report name
.oleCrystal.ReportFileName = "MyReport.RPT"
* Set the destination
.oleCrystal.Destination = 1
* Set the window title
.oleCrystal.WindowTitle = "My Report"
* Cancel the error handler to avoid a bug in Crystal Reports ActiveX control.
* This bug causes and OLE error when the user cancels the report
lcOnError = ON("ERROR")
ON ERROR *

* Activate Crystal Reports
.oleCrystal.Action = 1

* Reset the error handler
ON ERROR &lcOnError.
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