Consultor Eletrônico



Kbase 17352: Using Actuate API to run .rox and set new name for .roi file
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Using Actuate API to run .rox and set new name for .roi file

/*------------------------------------------------------------------*/
/* The following is a simple example of using the Actuate API to */
/* run a report executable (.rox file) and specify a new name for */
/* the .roi file from the Progress 4gl. */
/* Note that you must use AcReqSetValueString to set the path and */
/* name for your .rox file and new .roi file name before calling */
/* AcReqGenerateReport. */
/* There are many options you may wish to control when running a */
/* report using the API. For information on these options, please */
/* see the Actuate Application Programming Interface Guide. */
/*------------------------------------------------------------------*/
/* SetRoi.p */

/* ------------------------------------------------------------- */
/* --- LOCAL VARIABLE DECLARATION --- */
/* ------------------------------------------------------------- */

DEFINE VAR ari_return AS INTEGER.
DEFINE VAR aru_return AS INTEGER Initial 0.
DEFINE VAR argr_return AS INTEGER.
DEFINE VAR arrf_return AS INTEGER.

DEFINE VAR ACT_Rox AS CHARACTER NO-UNDO.
DEFINE VAR ACT_Roi AS CHARACTER NO-UNDO.

/*--------------- Interacting with the EUDT ---------------*/

DEFINE VAR AC_REQ_VIEW As INTEGER INITIAL 4. /* Views report */

ACT_Rox = "c:\actwork\design1.rox".
ACT_Roi = "c:\actwork\NewRoiName.roi".

/* ------------------------------------------------------------- */
/* --- INITIALIZE THE API --- */
/* ------------------------------------------------------------- */

RUN AcReqInitialize (OUTPUT ari_return).

/* ------------------------------------------------------------- */
/* --- Run the report, and remove the .dll from memory --- */
/* ------------------------------------------------------------- */

RUN AcReqReadFile(ACT_Rox, OUTPUT arrf_return).
RUN AcReqSetValueString(arrf_return,"RoxFileName", ACT_Rox).
RUN AcReqSetValueString(arrf_return,"RoiFileName", ACT_Roi).
RUN AcReqGenerateReport(ACT_Rox, AC_REQ_VIEW, arrf_return, OUTPUT
argr_return).
RUN AcReqUnInitialize (ari_return, OUTPUT aru_return).

/* ------------------------------------------------------------- */
/* --- EXTERNAL PROCEDURE DEFINITIONS TO THE reqst32.DLL --- */
/* */
/* These definitions assume that REQST32.DLL can be found by */
/* MS-Windows by searching the PATH environment variable. This */
/* means that c:\actuate\devwb\bin should be in your PATH. */
/* ------------------------------------------------------------- */

PROCEDURE AcReqInitialize EXTERNAL "reqst32.DLL" PERSISTENT:
DEFINE RETURN PARAMETER ari_return AS LONG.
END PROCEDURE.

PROCEDURE AcReqGenerateReport EXTERNAL "reqst32.DLL"PERSISTENT:
DEFINE INPUT PARAMETER filename AS CHARACTER.
DEFINE INPUT PARAMETER options AS LONG.
DEFINE INPUT PARAMETER filenumber AS LONG.
DEFINE RETURN PARAMETER argr_return AS LONG.
END PROCEDURE.

PROCEDURE AcReqReadFile EXTERNAL "reqst32.DLL" PERSISTENT:
DEFINE INPUT PARAMETER filename AS CHARACTER.
DEFINE RETURN PARAMETER arrf_return AS LONG.
END PROCEDURE.

PROCEDURE AcReqSetValueString EXTERNAL "reqst32.DLL" PERSISTENT:
DEFINE INPUT PARAMETER filenumber AS LONG.
DEFINE INPUT PARAMETER parmName AS CHARACTER.
DEFINE INPUT PARAMETER parmValue AS CHARACTER.
END PROCEDURE.

PROCEDURE AcReqUnInitialize EXTERNAL "reqst32.DLL" :
DEFINE INPUT PARAMETER ari_return AS LONG.
DEFINE RETURN PARAMETER aru_return AS SHORT.
END PROCEDURE.


Progress Software Technical Support Note # 17352