Bom dia a todos !
Estou executando este código abaixo , mas parece que a versão que tenho do crystal não reconhece o objeto que estou criando . alguem saberia me dizer como posso conectar com a versão do crystal XI .
#include "FiveWin.ch"
FUNCTION report()
LOCAL oVentHija, tReport
oCRApp := CreateObject("CrystalRuntime.Application.11")
oCrp := oCRApp:OpenReport("C:\SELLER_5win\report\SP_RAEE.rpt")
oCRReportBlanc := oCRApp:OpenReport("blanc.rpt")
DEFINE Window oVentHija MDICHILD Title cTitle OF oPublic:oWnd
oActiveX := TActiveX():New( oVentHija, "CrystalReports11.ActivexReportViewer.1" )
oVentHija:oClient := oActiveX
oVentHija:cTitle( "Título de la ventana" )
oActivex:SetProp( "ReportSource", oCrp )
oActiveX:SetProp( "EnableStopButton", 1 )
oActiveX:SetProp( "EnableAnimationCtrl", 0 )
oActiveX:SetProp( "EnableCloseButton", 1 )
oActiveX:SetProp( "EnableExportButton", 1 )
oActiveX:SetProp( "EnablePopupMenu", 0 )
oActiveX:bOnEvent = { | event, aParams | EventInfo( event, aParams, oCrp, oActivex ) }
ACTIVATE WINDOW oVentHija;
ON INIT ( oActiveX:Do( "Viewreport" ), oActivex:Do( "Zoom", '90' ) );
Valid ( oActivex:SetProp( "ReportSource", oCRReportBlanc ), .T. )
return
function EventInfo( event, aParams, oCRReport, oActivex )
local cMsg := cValToChar( event ) //+ CRLF
return cMsg