endhey
Programmer
- Jan 27, 2012
- 9
I got a problem to open report(CR XI) from VFP9,,when I using CR 8.5 there is no problem,,
below is coding for open report CR8.5 (there is no problem):
oCRApp = createobject("CrystalRuntime.Application")
oRep = oCRApp.OpenReport("D:\SIAP2\CR\Supplier.rpt")
oRep.Preview
thisform.olecontrol1.ReportSource= oRep
thisform.olecontrol1.viewReport()
thisform.olecontrol1.zoom (100)
Coding for open Report CR XI:
oCRApp = createobject("CrystalReports11.ObjectFactory.1")
oRep = oCRApp.OpenReport("D:\SIAP2\CR\Supplier.rpt") &&error
oRep.Preview
thisform.olecontrol1.ReportSource= oRep
thisform.olecontrol1.viewReport()
thisform.olecontrol1.zoom (100)
the error is "OLE Error code 0x80020006: Unknown name" and error pointing to oRep = oCRApp.OpenReport("D:\SIAP2\CR\Supplier.rpt")
Any help would be appreciated.
below is coding for open report CR8.5 (there is no problem):
oCRApp = createobject("CrystalRuntime.Application")
oRep = oCRApp.OpenReport("D:\SIAP2\CR\Supplier.rpt")
oRep.Preview
thisform.olecontrol1.ReportSource= oRep
thisform.olecontrol1.viewReport()
thisform.olecontrol1.zoom (100)
Coding for open Report CR XI:
oCRApp = createobject("CrystalReports11.ObjectFactory.1")
oRep = oCRApp.OpenReport("D:\SIAP2\CR\Supplier.rpt") &&error
oRep.Preview
thisform.olecontrol1.ReportSource= oRep
thisform.olecontrol1.viewReport()
thisform.olecontrol1.zoom (100)
the error is "OLE Error code 0x80020006: Unknown name" and error pointing to oRep = oCRApp.OpenReport("D:\SIAP2\CR\Supplier.rpt")
Any help would be appreciated.