[Migrated content. Thread originally posted on 14 January 2005]
About C$GETEVENTPARAMHello,
I?m trying to manage the parameters returned by an event fired in the crystal reports ActiveX viewer, but unsuccessfully I can say.
The DEF file of the ActiveX control shows the parameters of the event:
* Clicked
EVENT, 418, @CrystalActiveXReportViewerClicked
* 4 Parameters
* "long x"
* "long y"
* [b]"VARIANT* EventInfo"[/b]
* "boolean* UseDefault"
As you can see, the third parameter returns a Variant Type that points to an Object (@CRVEventInfo Object) which I need to process.
What I'm doing is to use "C$GETEVENTPARAM" routine to obtain the values:
...
[b]77 H-EVENTINFO HANDLE OF @CRVEventInfo.[/b]
77 X-VALUE PIC 9(05).
77 Y-VALUE PIC 9(05).
77 RESULT PIC S9(01).
...
EVALUATE EVENT-DATA-2
WHEN @CrystalActiveXReportViewerClicked
CALL "C$GETEVENTPARAM" USING
EVENT-CONTROL-HANDLE "x" X-VALUE
CALL "C$GETEVENTPARAM" USING
EVENT-CONTROL-HANDLE "y" Y-VALUE
[B]CALL "C$GETEVENTPARAM" USING
EVENT-CONTROL-HANDLE "EventInfo" H-EVENTINFO[/B]
CALL "C$GETEVENTPARAM" USING
EVENT-CONTROL-HANDLE "UseDefault" RESULT
...
All parameters, except H-EVENTINFO, are properly returned. H-EVENTINFO is always Zero. The problem could be the conversion performed by C$GETEVENTPARAM and C$GETEVENTDATA but I'm unsure about this.
Can someone switch on the bulb ?
Regards.