Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Corrupt Object?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Titre:
Divers
Thread ID:
00689296
Message ID:
00691023
Vues:
17
This worked:
http://support.crystaldecisions.com/library/kbase/articles/c2006956.asp

>I think the error is because the ActiveX control expects the form to be instantiated before it is. Delete the control and then do an AddObject in the form.Init. Does it work then?
>
>As for the export issue, look at the following Crystal KB article:
>http://support.crystaldecisions.com/library/kbase/articles/c2009297.asp
>
>
>>I'm trying to integrate Crystal Reports into VFP for the first time. I've got version 8.5 and am using VFP 7.0 with the SP installed. I've created a real basic report in Crystal and am trying to get a preview of it. I can print it programatically without a problem - but can't seem to get the preview to work correctly.
>>
>>I'm using the Crystal Report Viewer ActiveX control on a basic form. I've added this code (From Craig's Essential Fox session) to the INIT of the form:
>>
>>LOCAL cr AS CRViewer.crViewer
>>
>>WITH This
>> .WindowState = 2
>> .oCrystal = CREATEOBJECT("CrystalRuntime.Application")
>> .oReport = .oCrystal.OpenReport("c:\mc\crystal reports\rptwork.rpt")
>>
>> WITH thisform.oleCRViewer
>> .EnableExportButton = .T.
>> .EnableProgressControl = .T.
>> .ReportSource = ThisForm.oReport
>> .EnableAnimationCtrl = .F.
>> .ViewReport()
>> ENDWITH
>> .Visible = .T.
>>ENDWITH
>>
>>and this to the RESIZE method:
>>
>>with thisform.oleCRViewer
>> .top = 1
>> .left = 1
>> .height = this.Height - 2
>> .width = this.Width - 2
>>endwith
>>
>>When I run the form, I get this message - "OLE exception error: Exception code c0000005. OLE object may be corrupt." After I click "Ok" on the message, everything works fine (except that I can't export in PDF - which is another issue I'll ask about later).
>>
>>I've uninstalled and reinstalled Crystal Reports - that didn't help any. Basically, I'm hoping someone can help me identify what the problem is.
>>
>>If I put a "SET STEP ON" at the end of the INIT code, I don't get the error message...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform