Crystal Report from Open Edge GUI Application

AKumar

New Member
Hi,

I am using open Edge and Crystal Report 7.0 on windows 2000 paltform. I made an odbc connection for the database so that i can use Progress Open Edge Database in Crystal Report 7.0 and i have made a crystal Report "abc.rpt" file. I want to filteres data and called the specific report from Open Edge GUI Application. I am using Crystal Report Viewer crviewer.dll ocx in the Progress windows and using the code below :

DEFINE VARIABLE CRComHdl AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE CRViewer AS COM-HANDLE NO-UNDO.

CREATE "Crystal.CRPE.Application":U CRComHdl.
Assign crviewer = crcomhdl:eek:penReport("c:\crydb\report\CustInformation.rpt", 1).


CRViewer = chctrlFrame:ITEM(1).

/*CRViewer:viewreport. */ if i remove the comments then it will give the error message.


RELEASE OBJECT crcomhdl.

If i give the crviewer:viewreport() then it give the error message "Invalid Component-Handle referenced while processing method/statement: Viewreport, Initialize object abc.w.

If i give in the comments or remove this line then it will show the window but it not open the report. Please help me or give any example of how can i call a crystal report from a progress GUI Apllications.

Please send me your valuable suggestion and help.

Regards,
Akumar
 

schaapie

Member
I'm not sure, but in my prototype i had two extra lines:
Code:
  CRViewer = chCtrlFrame:CONTROLS:ITEM(1).
  CRViewer:ReportSource = ichDocument.
  CRViewer:REFRESH.
  CRViewer:ViewReport.

Since we're not yet on OE10, i haven't tested much with the viewer.
So this is the only help I can give.
 

schaapie

Member
Did it help?
Because now I also see you have:
Code:
CRViewer = chctrlFrame:ITEM(1).
and I had:
Code:
CRViewer = chCtrlFrame:CONTROLS:ITEM(1).
maybe that causes the wrong com-handle to be set?
 
Top