Error win32ole.prg => TOLEAUTO:ADJCLIENT(0)
Error win32ole.prg => TOLEAUTO:ADJCLIENT(0)
I'm getting this error working with activex crystal reports. Does anyone knows the reason?
When the window with the oViewer control gets activated I get the error.
Otherwise all ole control of the object works ok.
Any ideas ?
Antonio
When the window with the oViewer control gets activated I get the error.
Otherwise all ole control of the object works ok.
Any ideas ?
Antonio
- Antonio Linares
- Site Admin
- Posts: 42537
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 77 times
- Contact:
Antonio,
Thanks, but now the viewer object doesn't apper on the window.
The reports works ok to the printer but not to the screen.
Here is the code that should work ok.
DEFINE WINDOW oWnd TITLE cTitle
oCRViewer := ToleAuto():New("CrystalReports.ActiveXReportViewer" )
oCRViewer:EnableExportButton :=1
oCRViewer:EnableStopButton:= 1
oCRViewer:EnableNavigationControls:=1
oCRViewer:EnablePopupMenu:=0
oCRViewer:EnableCloseButton:=0
if lPcdata
oCRViewer:DisplayGroupTree:=0
oCRViewer:EnableDrillDown:=0
oCRViewer:EnableGroupTree:=0
endif
oCRViewer:ReportSource:= oReport
oCRViewer:ViewReport()
oCrViewer:Zoom:=75
oWnd:oClient := oCRViewer
ACTIVATE WINDOW oWnd MAXIMIZED ;
VALID (oReport:CancelPrinting(),oCrystal:CanClose() )
Thanks, but now the viewer object doesn't apper on the window.
The reports works ok to the printer but not to the screen.
Here is the code that should work ok.
DEFINE WINDOW oWnd TITLE cTitle
oCRViewer := ToleAuto():New("CrystalReports.ActiveXReportViewer" )
oCRViewer:EnableExportButton :=1
oCRViewer:EnableStopButton:= 1
oCRViewer:EnableNavigationControls:=1
oCRViewer:EnablePopupMenu:=0
oCRViewer:EnableCloseButton:=0
if lPcdata
oCRViewer:DisplayGroupTree:=0
oCRViewer:EnableDrillDown:=0
oCRViewer:EnableGroupTree:=0
endif
oCRViewer:ReportSource:= oReport
oCRViewer:ViewReport()
oCrViewer:Zoom:=75
oWnd:oClient := oCRViewer
ACTIVATE WINDOW oWnd MAXIMIZED ;
VALID (oReport:CancelPrinting(),oCrystal:CanClose() )
- Enrico Maria Giordano
- Posts: 8756
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
This is a sample that I successfully tried in the past (please note that I don't have CR installed now and therefore I can't test it anymore):
EMG
Code: Select all | Expand
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oCrystal := CREATEOBJECT( "CrystalRuntime.Application" )
LOCAL oReport := oCrystal:OpenReport( "PROVA.RPT" )
LOCAL oWnd, oCRViewer
DEFINE WINDOW oWnd
oCRViewer = TActiveX():New( oWnd, "CRViewer9.CRViewer" )
oCRViewer:SetProp( "ReportSource", oReport )
oCRViewer:Do( "ViewReport" )
oWnd:oClient = oCRViewer
ACTIVATE WINDOW oWnd;
MAXIMIZED
RETURN NIL
EMG
- Antonio Linares
- Site Admin
- Posts: 42537
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 77 times
- Contact:
Changing from toleauto to tactivex I get the error :
Error description: Error BASE/1004 Class: 'NUMERIC' has no exported method: HWND
Args:
Stack Calls
===========
Called from: => HWND(0)
Called from: TActiveX.prg => TACTIVEX:NEW(0)
Called from: TActiveX.prg => CREATEACTIVEX(184)
Called from: TActiveX.prg => TACTIVEX:NEW(0)
Called from: crtfwup.PRG => MAIN(275)
Error description: Error BASE/1004 Class: 'NUMERIC' has no exported method: HWND
Args:
Stack Calls
===========
Called from: => HWND(0)
Called from: TActiveX.prg => TACTIVEX:NEW(0)
Called from: TActiveX.prg => CREATEACTIVEX(184)
Called from: TActiveX.prg => TACTIVEX:NEW(0)
Called from: crtfwup.PRG => MAIN(275)
- Antonio Linares
- Site Admin
- Posts: 42537
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 77 times
- Contact: