Page 1 of 1

Error Prueba de OCX

Posted: Mon Jan 30, 2006 7:15 pm
by Jdangulo
Estoy haciendo pruebas con ole, estoy usando el ocx de R&R version 11
pero me da el siguiente error, si alquien sabe que pasa, me ayudaria mucho.

Application
===========
Path and name: F:\Proyecto\Maxima\Maxima.Exe (32 bits)
Size: 4,382,720 bytes
Time from start: 0 hours 0 mins 17 secs
Error occurred at: 2006.01.30, 14:05:01
Error R&R.ReportControl/16389 E_FAIL: _REPORTDIRECTORY
Args:
[ 1] = C c:\Program Files\ReportWorks\Sample

Stack Calls
===========
Called from TOLEAUTO:_REPORTDIRECTORY(0)
Called from PRUEBA_OCX(1569)
Called from (b)TORDENCOMPRA:NEW(106)
Called from (b)TORDENCOMPRA:WBROWSE(248)
Called from TVMENU:EVALACTION(1635)
Called from TVMENU:LBUTTONUP(1337)
Called from TWINDOW:HANDLEEVENT(0)
Called from TCONTROL:HANDLEEVENT(0)
Called from TVMENU:HANDLEEVENT(881)
Called from _FWH(0)
Called from DIALOGBOX(0)
Called from TDIALOG:ACTIVATE(0)
Called from TORDENCOMPRA:WBROWSE(376)
Called from (b)TORDENCOMPRA:TORDENCOMPRA(60)
Called from TORDENCOMPRA:ACTIVATE(0)
Called from ORDENCOMPRAS(43)
Called from (b)TAPLICA:MENU(704)
Called from TMENU:COMMAND(0)
Called from TWINDOW:COMMAND(0)
Called from TWINDOW:HANDLEEVENT(0)
Called from _FWH(0)
Called from WINRUN(0)
Called from TWINDOW:ACTIVATE(0)
Called from TAPLICA:ACTIVATE(634)
Called from OPEN_APLICA(69)
Called from MAIN_(40)

Este es el codigo Ejemplo

//------------------------------------//

Function PRueba_ocx()

Local rr:= TOleAuto():New( "R&R.ReportControl" )

IF Ole2TxtError() != "S_OK"
//MsgAlert(" object creation not successful...", "Error")
ELSE
? "TOdo OK"
ENDIF

RR:ReportDirectory ="c:\Program Files\ReportWorks\Sample"
rr:ReportName ="Basic Columnar Report.rrw"
rr:RunReport()


José David Angulo

Re: Error Prueba de OCX

Posted: Tue Jan 31, 2006 12:47 am
by R.F.
Jdangulo wrote:
RR:ReportDirectory ="c:\Program Files\ReportWorks\Sample"
rr:ReportName ="Basic Columnar Report.rrw"
rr:RunReport()


José David Angulo
Esta mal esta linea:

RR:ReportDirectory ="c:\Program Files\ReportWorks\Sample"

Lo qu esta haciendo aqui es comparar si la data ::reportDirectory es "C:\program files...." lo cual no es cierto porque no existe.

Recuerda que el operador de comparacion es "=" y el de asignacion es ":=", aunque en _, sobre todo con variables normales las asignaciones con "=" funcionan, no creo que sea igual con los objetos.