FoxPro/Crytal Report Error
Expert: Markish - 9/8/2008
QuestionQUESTION: Markish,
Good day. I'm working on VFP 7 and Crystal Report 8.5.
I always received the following error when loading the form with Crystal Report Viewer.
"OLE exception error: Exception code c00000005. OLE object may be corrupt."
Below is my form.init code.
Local oCR As CRAXDRT.Application
Local cr As crviewer.crviewer
Local oRpt As CRAXDRT.Report
Local oDB As CRAXDRT.Database
Local ocDBT As CRAXDRT.DatabaseTables
Local oDBT As CRAXDRT.DatabaseTable
oCR = Createobject("CrystalRuntime.Application")
oRpt = oCR.OpenReport(gcReportFileLocation)
This.oleCRViewer.ReportSource = oRpt
This.AutoCenter = .T.
This.oleCRViewer.EnableAnimationCtrl = .T.
This.oleCRViewer.EnableExportButton = .T.
This.oleCRViewer.enableGroupTree = .F.
This.oleCRViewer.Top = This.Top
This.oleCRViewer.Left = This.Left
This.oleCRViewer.Visible = .T.
This.oleCRViewer.Height = This.Height
This.oleCRViewer.Width = This.Width
This.oleCRViewer.enableProgressControl = .T.
This.oleCRViewer.showFirstPage
This.oleCRViewer.viewReport
Thanks.
Best Regards,
Flex Falcasantos
VPF 7.0 Developer
ANSWER: Hi Flex,
IMHO, it seems there is some issue with your activex control - i.e the Crystal report viewer control. Please try re-installing the same.
Hope this helps..
Best regards,
Markish
http://markishonline.com
---------- FOLLOW-UP ----------
QUESTION: Markish,
Sorry for sending the same question many times...As a follow up, I've already removed and reinstalled Crystal Report 8.5. I've got the same problem. I tried running Crystal Report 9, it went smoothly. Can you help me with this. . . I'm running Win XP SP2, VFP 7.0 and Crystal 8.5.
Thanks.
FLeX
AnswerHi Flex,
I tried the same environment in my laptop today.... It's fine here.. Probably needs to check more on your machine..
If you can give any more information on this, probably I can try debugging.
Best regards,
Markish
http://markishonline.com