Kbase 17213: Use Actuate API to run report executable .rox from Progress
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Use Actuate API to run report executable .rox from Progress
/*------------------------------------------------------------------*/
/* The following is a simple example of using the Actuate API to */
/* run a report executable (.rox file) from the Progress 4gl. */
/* Note that you must use AcReqSetValueString to set the path and */
/* name for your .rox file 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. */
/*------------------------------------------------------------------*/
/* RunRox.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_REPORT AS CHARACTER NO-UNDO.
/*---------- Interacting with the End User Desktop -------------*/
DEFINE VAR AC_REQ_VIEW As INTEGER INITIAL 4. /* Views report */
/* For other API option values, see the file */
/* c:\Actuate\Devwb\reqapivb.txt. Note that this is a Visual Basic */
/* file. The Hex values listed must be converted into Decimal to */
/* be of use by Progress. For example, &H0004 must be changed to 4.*/
ACT_REPORT = "<specify the path and name of your .rox file here>".
/* ------------------------------------------------------------- */
/* --- INITIALIZE THE API --- */
/* ------------------------------------------------------------- */
RUN AcReqInitialize (OUTPUT ari_return).
/* ------------------------------------------------------------- */
/* Open the .rox file, set the path and name of the .rox file, */
/* generate the report, and remove the .dll from memory. */
/* ------------------------------------------------------------- */
RUN AcReqReadFile(ACT_REPORT, OUTPUT arrf_return).
RUN AcReqSetValueString(arrf_return,"RoxFileName", ACT_REPORT).
RUN AcReqGenerateReport(ACT_REPORT, 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 # 17213