Calling Crystal Reports 2008 from Progress

marcia

New Member
Hi guys

I saw an earlier thread in which someone was calling Crystal 9 from Progress using the following code:

DEF VAR hCrysApp AS COM-HANDLE NO-UNDO.
CREATE "CrystalDesignRuntime.Application" hCrysApp.
ASSIGN hCrysApp:VISIBLE = TRUE.
RELEASE OBJECT hCrysApp NO-ERROR.

That no longer seems to work with Crystal 2008 - is anyone else having similar problems? Is it because I have both the viewer and the development version on the same pc and now it's confused?

I'm getting the error "The automation server for CrystalDesignRuntime.Application is not registered properly. Please reinstall this server or try registering it again. (5893)"
 

marcia

New Member
Ok I've (kind of) solved it:

PROCEDURE ShellExecuteA EXTERNAL "shell32" :
DEFINE INPUT PARAMETER HWND AS LONG.
DEFINE INPUT PARAMETER lpOperation AS CHAR.
DEFINE INPUT PARAMETER lpFile AS CHAR.
DEFINE INPUT PARAMETER lpParameters AS CHAR.
DEFINE INPUT PARAMETER lpDirectory AS CHAR.
DEFINE INPUT PARAMETER nShowCmd AS LONG.
DEFINE RETURN PARAMETER hInstance AS LONG.
END.
DEFINE FRAME DDEFrame SKIP(1) WITH SIDE-LABELS.
ASSIGN FRAME DDEFrame:VISIBLE = TRUE
FRAME DDEFrame:HIDDEN = TRUE.
DEFINE VARIABLE hInstance AS INTEGER NO-UNDO.
RUN ShellExecuteA (0,"open","c:\Documents and Settings\marcia\desktop\Address Type.rpt","","",1,OUTPUT hInstance).

But this means that the report you open has to already have the data saved into it, which is apparently a requisite for using the Crystal Reports Viewer.
 

vdennis

Member
If you need it I had to write a program when BOXII first came out and the RDC was removed as a simple install. With the RDC you can pass parameters directly to a CR report without any data in it. Does not require CR 2008 viewer or CR2008 to be installed. Only needs to be installed on any PC / Server that would be requiring it. Check out SAP's web site regarding using the RDC. The files needed for the install were no longer shipped aver BOXII release 2.
Dennis
Programer
Adams-Burch Inc.
www.adams-burch.com
 
Top