&ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI ADM2 &ANALYZE-RESUME /* Connected Databases anadat PROGRESS */ &Scoped-define WINDOW-NAME CURRENT-WINDOW {adecomm/appserv.i} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS dTables /*------------------------------------------------------------------------ File: Description: from DATA.W - Template For SmartData objects in the ADM Input Parameters: Output Parameters: Modified: February 24, 1999 ------------------------------------------------------------------------*/ /* This .W file was created with the Progress AppBuilder. */ /*----------------------------------------------------------------------*/ /* Create an unnamed pool to store all the widgets created by this procedure. This is a good default which assures that this procedure's triggers and internal procedures will execute in this procedure's storage, and that proper cleanup will occur on deletion of the procedure. */ CREATE WIDGET-POOL. /* *************************** Definitions ************************** */ /* Parameters Definitions --- */ /* Local Variable Definitions --- */ &SCOPED-DEFINE Tabelle HilfsTab &SCOPED-DEFINE TabWhere /* USE-INDEX Benutzer-k1 ~ WHERE {&Tabelle}.Benutzer = tRowObject.Benutzer */ { incl/datdefinition.i } /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK /* ******************** Preprocessor Definitions ******************** */ &Scoped-define PROCEDURE-TYPE SmartDataObject &Scoped-define DB-AWARE yes &Scoped-define ADM-SUPPORTED-LINKS Data-Source,Data-Target,Navigation-Target,Update-Target,Commit-Target,Filter-Target /* Db-Required definitions. */ &IF DEFINED(DB-REQUIRED) = 0 &THEN &GLOBAL-DEFINE DB-REQUIRED TRUE &ENDIF &GLOBAL-DEFINE DB-REQUIRED-START &IF {&DB-REQUIRED} &THEN &GLOBAL-DEFINE DB-REQUIRED-END &ENDIF &Scoped-define QUERY-NAME Query-Main /* Internal Tables (found by Frame, Query & Browse Queries) */ &Scoped-define INTERNAL-TABLES HilfsTab /* Definitions for QUERY Query-Main */ &Scoped-Define ENABLED-FIELDS Firma Sort_1 Sort_2 Zeichen_1 Zeichen_2 Zahl1 Zahl2 Zahl3 Zahl4 Zahl5 Zahl6~ Zahl7 Zahl8 Zahl9 &Scoped-define ENABLED-FIELDS-IN-HilfsTab Firma Sort_1 Sort_2 Zeichen_1 ~ Zeichen_2 Zahl1 Zahl2 Zahl3 Zahl4 Zahl5 Zahl6 Zahl7 Zahl8 Zahl9 &Scoped-Define DATA-FIELDS Firma Sort_1 Sort_2 Zeichen_1 Zeichen_2 Zahl1 Zahl2 Zahl3 Zahl4 Zahl5 Zahl6~ Zahl7 Zahl8 Zahl9 &Scoped-define DATA-FIELDS-IN-HilfsTab Firma Sort_1 Sort_2 Zeichen_1 ~ Zeichen_2 Zahl1 Zahl2 Zahl3 Zahl4 Zahl5 Zahl6 Zahl7 Zahl8 Zahl9 &Scoped-Define MANDATORY-FIELDS &Scoped-Define APPLICATION-SERVICE &Scoped-Define ASSIGN-LIST rowObject.Zahl1 = HilfsTab.Zahl[1] rowObject.Zahl2 = HilfsTab.Zahl[2]~ rowObject.Zahl3 = HilfsTab.Zahl[3] rowObject.Zahl4 = HilfsTab.Zahl[4]~ rowObject.Zahl5 = HilfsTab.Zahl[5] rowObject.Zahl6 = HilfsTab.Zahl[6]~ rowObject.Zahl7 = HilfsTab.Zahl[7] rowObject.Zahl8 = HilfsTab.Zahl[8]~ rowObject.Zahl9 = HilfsTab.Zahl[9] &Scoped-Define DATA-FIELD-DEFS "d-dokudrucker.i" &Scoped-define QUERY-STRING-Query-Main FOR EACH HilfsTab NO-LOCK INDEXED-REPOSITION {&DB-REQUIRED-START} &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH HilfsTab NO-LOCK INDEXED-REPOSITION. {&DB-REQUIRED-END} &Scoped-define TABLES-IN-QUERY-Query-Main HilfsTab &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main HilfsTab /* Custom List Definitions */ /* List-1,List-2,List-3,List-4,List-5,List-6 */ /* _UIB-PREPROCESSOR-BLOCK-END */ &ANALYZE-RESUME /* ************************ Function Prototypes ********************** */ {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getCurrentRecid dTables _DB-REQUIRED FUNCTION getCurrentRecid RETURNS RECID ( /* parameter-definitions */ ) FORWARD. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED FUNCTION openQuery RETURNS LOGICAL ( /* parameter-definitions */ ) FORWARD. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} /* *********************** Control Definitions ********************** */ {&DB-REQUIRED-START} /* Query definitions */ &ANALYZE-SUSPEND DEFINE QUERY Query-Main FOR HilfsTab SCROLLING. &ANALYZE-RESUME {&DB-REQUIRED-END} /* ************************ Frame Definitions *********************** */ /* *********************** Procedure Settings ************************ */ &ANALYZE-SUSPEND _PROCEDURE-SETTINGS /* Settings for THIS-PROCEDURE Type: SmartDataObject Allow: Query Frames: 0 Add Fields to: Neither Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE */ /* This procedure should always be RUN PERSISTENT. Report the error, */ /* then cleanup and return. */ IF NOT THIS-PROCEDURE:PERSISTENT THEN DO: MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U VIEW-AS ALERT-BOX ERROR BUTTONS OK. RETURN. END. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS /* ************************* Create Window ************************** */ &ANALYZE-SUSPEND _CREATE-WINDOW /* DESIGN Window definition (used by the UIB) CREATE WINDOW dTables ASSIGN HEIGHT = 2 WIDTH = 65.2. /* END WINDOW DEFINITION */ */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables /* ************************* Included-Libraries *********************** */ {src/adm2/data.i} /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME /* *********** Runtime Attributes and AppBuilder Settings *********** */ &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES /* SETTINGS FOR WINDOW dTables VISIBLE,,RUN-PERSISTENT */ /* _RUN-TIME-ATTRIBUTES-END */ &ANALYZE-RESUME /* Setting information for Queries and Browse Widgets fields */ &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main /* Query rebuild information for SmartDataObject Query-Main _TblList = "AnaDat.HilfsTab" _Options = "NO-LOCK INDEXED-REPOSITION" _FldNameList[1] > AnaDat.HilfsTab.Firma "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes "" _FldNameList[2] > AnaDat.HilfsTab.Sort_1 "Sort_1" "Sort_1" "Benutzer" "x(20)" "character" ? ? ? ? ? ? yes ? no 20 yes "" _FldNameList[3] > AnaDat.HilfsTab.Sort_2 "Sort_2" "Sort_2" "Dokument" "x(20)" "character" ? ? ? ? ? ? yes ? no 20 yes "" _FldNameList[4] > AnaDat.HilfsTab.Zeichen_1 "Zeichen_1" "Zeichen_1" "Drucker" "X(60)" "character" ? ? ? ? ? ? yes ? no 60 yes "" _FldNameList[5] > AnaDat.HilfsTab.Zeichen_2 "Zeichen_2" "Zeichen_2" "Schrift" ? "character" ? ? ? ? ? ? yes ? no 20 yes "" _FldNameList[6] > AnaDat.HilfsTab.Zahl[1] "Zahl[1]" "Zahl1" "ToZe" "99" "integer" ? ? ? ? ? ? yes ? no 5.2 yes "" _FldNameList[7] > AnaDat.HilfsTab.Zahl[2] "Zahl[2]" "Zahl2" "KoZe" "99" "integer" ? ? ? ? ? ? yes ? no 5.2 yes "" _FldNameList[8] > AnaDat.HilfsTab.Zahl[3] "Zahl[3]" "Zahl3" "FuZe" "99" "integer" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[9] > AnaDat.HilfsTab.Zahl[4] "Zahl[4]" "Zahl4" "Kopien" "99" "integer" ? ? ? ? ? ? yes ? no 6.6 yes "" _FldNameList[10] > AnaDat.HilfsTab.Zahl[5] "Zahl[5]" "Zahl5" "Schacht Original" "zzz9" "integer" ? ? ? ? ? ? yes ? no 15.6 yes "" _FldNameList[11] > AnaDat.HilfsTab.Zahl[6] "Zahl[6]" "Zahl6" "Schacht Kopie" "zzz9" "integer" ? ? ? ? ? ? yes ? no 14 yes "" _FldNameList[12] > AnaDat.HilfsTab.Zahl[7] "Zahl[7]" "Zahl7" "BESR" "zzz9" "integer" ? ? ? ? ? ? yes ? no 5.8 yes "" _FldNameList[13] > AnaDat.HilfsTab.Zahl[8] "Zahl[8]" "Zahl8" "Schacht BESR" "zzz9" "integer" ? ? ? ? ? ? yes ? no 14.4 yes "" _FldNameList[14] > AnaDat.HilfsTab.Zahl[9] "Zahl[9]" "Zahl9" ? ? "integer" ? ? ? ? ? ? yes ? no 11 yes "" _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 ) */ /* QUERY Query-Main */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables /* *************************** Main Block *************************** */ SAktiv = DYNAMIC-FUNCTION('getSuperAktiv':U) NO-ERROR. IF SAktiv THEN DO: Firma = DYNAMIC-FUNCTION('GETMANDANT':U) NO-ERROR. END. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN RUN initializeObject. &ENDIF /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME /* ********************** Internal Procedures *********************** */ {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE dataAvailable dTables _DB-REQUIRED PROCEDURE dataAvailable : /*------------------------------------------------------------------------------ Purpose: Super Override Parameters: Notes: ------------------------------------------------------------------------------*/ EMPTY TEMP-TABLE tRowObject. CREATE tRowObject. { incl/datdataavailable.i } END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE PROCEDURE disable_UI : /*------------------------------------------------------------------------------ Purpose: DISABLE the User Interface Parameters: Notes: Here we clean-up the user-interface by deleting dynamic widgets we have created and/or hide frames. This procedure is usually called when we are ready to "clean-up" after running. ------------------------------------------------------------------------------*/ /* Hide all frames. */ IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME /* ************************ Function Implementations ***************** */ {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getCurrentRecid dTables _DB-REQUIRED FUNCTION getCurrentRecid RETURNS RECID ( /* parameter-definitions */ ) : /*------------------------------------------------------------------------------ Purpose: Notes: ------------------------------------------------------------------------------*/ { incl/datgetcurrentrecid.i } END FUNCTION. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED FUNCTION openQuery RETURNS LOGICAL ( /* parameter-definitions */ ) : /*------------------------------------------------------------------------------ Purpose: Super Override Notes: ------------------------------------------------------------------------------*/ xWhere = 'HilfsTab.Firma = "&1" AND HilfsTab.Sort_1 <> "&2" '. xWhere = SUBSTITUTE(xWhere, Firma, "DRUCKERAUSWAHL" ). DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere). /* xSort = ''. */ /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */ /* xWhere = ''. */ /* DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere). */ RETURN SUPER( ). END FUNCTION. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END}