Hello,
i'm currently playing around with the new Reportlistener class.
What i tried to do is, as the topic already states, to redirect the output to another devicecontext (hDC handle from GDI)
i've tried all available ListenerType's but can't get it to work ..
pseudocode:
...some API code to get me a custom hDC from my printer ...
loListener = CREATEOBJECT('oPrintTest',myHDC)
REPORT FORM someReport NEXT 3 OBJECT loListener
DEFINE CLASS oPrintTest AS ReportListener
ListenerType = 0
hDC = 0
PROCEDURE Init(lnhDC)
THIS.hDC = lnhDC
ENDPROC
PROCEDURE OutputPage(nPageNo, eDevice, nDeviceType ,nleft, nTop, nWidth, nHeight, ;
nClipLeft,nClipTop, nClipWidth, nClipHeight)
DODEFAULT(nPageNo,THIS.hDC,0,nLeft,nTop,nWidth,nHeight,nClipLeft,nClipTop,nClipWidth,nClipHeight)
ENDPROC
ENDDEFINE
all always get an error in OutputPage:
Function argument value, type, or count is invalid (Error 11)
from the help I initally thought that it would be rather easy to do it since it states:
"In page-at-a-time mode (ListenerType values 0 and 2), ReportListener uses this parameter to send you the current page number as it prepares each page for output. !! You can request that this single page be rendered to an alternate device at this point. !! "
Regards
Christian