Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Calling OpenInsight from within Arev32 (Functions/Subroutines/Programs,General) ====== ====== ====== ==== Created at 22 OCT 2012 03:13PM ==== This is a sample of calling an OpenInsight function from AREV32 sending and returning data. This sample will tell OpenInsight to print a report and return the result 'REPORT OK'. **AREV32 Program Test1** ** ** DECLARE FUNCTION CTO_GUI_FUNCTION !CALL OI SUBROUTINE SENDING REPORT NAME RESULTS = CTO_GUI_FUNCTION('TEST2','TESTRPT') CALL MSG(RESULTS) **OI Test1 Program** ** ** FUNCTION TEST2(REPORT) Call Run_Report(REPORT,'') RESULTS = 'REPORT OK' RETURN RESULTS {{kb1008_1.jpg}} {{kb1008_2.jpg}} The sample code below shows how to run a dialog box in OpenInsight from AREV32 sharing data. This sample will run a dialog box in OpenInsight sending in a control number to display and return the name and address entered in the dialog box. **AREV32 Program TEST** DECLARE FUNCTION CTO_DIALOG_BOX !CALL OI DIALOG BOX SENDING CONTOL NUMBER 12345 AS CREATEPARAM RESULTS = CTO_DIALOG_BOX('TEST',12345) ! DISPLAY RESULT OF DIALOG BOX CALL MSG(RESULTS) **Create Event of TEST window in OpenInsight.** control = createparam call set_property(@window:'.CONTROL','DEFPROP',CONTROL) RETURN 0 **Save Event of TEST window in OpenInsight.** RESULT = GET_PROPERTY(@WINDOW:'.NAME','DEFPROP') RESULT: = @FM: GET_PROPERTY(@WINDOW:'.ADDRESS','DEFPROP') CALL END_DIALOG(@WINDOW,RESULT) RETURN 0 {{kb1008_3.jpg}} {{kb1008_4.jpg}} kb/kb_articles/kb1008.txt Last modified: 2024/01/30 13:36by 127.0.0.1