ROW-DISPLAY on DYNAMIC browse on a TEMP.-TABLE - Forum - OpenEdge Development - Progress Community

ROW-DISPLAY on DYNAMIC browse on a TEMP.-TABLE

 Forum

ROW-DISPLAY on DYNAMIC browse on a TEMP.-TABLE

This question is not answered

Making a window for showing monthly data, with range of months selectable by user, i got almos everything acomplished, but got stuck on highlighting some extreme values.  I try the following, to no avail.  (debugging stream for finding what happended)

CREATE BROWSE hBrowse
        ASSIGN
        X = 40
        Y = 120
        WIDTH = 250
        DOWN = 25.19
        FRAME = FRAME {&frame-name}:handle
        READ-ONLY  = YES
        SENSITIVE = TRUE
        ROW-MARKERS = TRUE
        SEPARATORS = TRUE
        FIT-LAST-COLUMN = TRUE
        FONT = 1
        TRIGGERS:
            /*            ON DEFAULT-ACTION                                           */
            /*                DO:                                                     */
            /*                    APPLY "CHOOSE":U TO bAplicar IN FRAME {&FRAME-NAME}.*/
            /*                END.                                                    */
            ON ROW-DISPLAY
                DO:
                    OUTPUT STREAM dbg TO value("F:\t\uno.txt") append.

                    DO pos1 = 3 TO 27:
                        PUT STREAM dbg "pos: " pos1 SKIP.

                        myHColumn = hBrowse:GET-BROWSE-COLUMN(pos1).
                        PUT STREAM dbg "myHColumn:BUFFER-VALUE " myHColumn:BUFFER-VALUE SKIP.

                        IF tMinMax THEN
                        DO:
                            IF DECIMAL(myHColumn:BUFFER-VALUE) < ttscr.kMin THEN
                                ASSIGN
                                    myHColumn:BGCOLOR = 14.
                        END.
                        IF DECIMAL(myHColumn:BUFFER-VALUE) = 0  THEN
                            ASSIGN
                                myHColumn:fGCOLOR = 15.
                    END.

                    OUTPUT STREAM dbg close.
                END.
        END TRIGGERS.


    CREATE QUERY hQuery.
    hQuery:SET-BUFFERS(BUFFER ttScr:handle).

    hQuery:QUERY-PREPARE(cBaseQuery + " by Clase by Nombre").

    hQuery:QUERY-OPEN ().

    hBrowse:QUERY = hQuery.

    BUFFER ttScr:HANDLE:BUFFER-FIELD("Nombre"):FORMAT = "X(35)".


    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.Nombre").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.Clase").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K01").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K02").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K03").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K04").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K05").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K06").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K07").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K08").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K09").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K10").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K11").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K12").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K13").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K14").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K15").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K16").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K17").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K18").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K19").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K20").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K21").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K22").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K23").
    hColumn = hBrowse:ADD-LIKE-COLUMN ("ttScr.K24").

The problem is no foreground color changing for 0.00 present on a cell, and for testing, no debug file on disk,

Any clue what I'm missing?

All Replies
  • Perhaps I should address field  handle instead of column handle inside the row-display trigger?

  • Getting information from the browse via the browse handle itself often gives problems in my experience. What I did for my DataDigger was to save the column handles in a temp-table and iterate on that. Much faster too by the way. Especially retrieving the name of the browse column proved to be problematic.

    So my suggestion is to replace the construction of "DO pos1 = 3 TO 27:" with a FOR EACH ttBrowseColumn. First create a ttBrowseColumn with the handle of the browse column as the only field. Reference that field inside your row-display trigger instead of hBrowse:GET-BROWSE-COLUMN(pos1).

  • Thanks Patrick!!!!!

    I'll be implementing that in a few hours!!!  will keep you (and everyone) posted..

  • The knowledgebase also has an example of what is mentioned by Patrick:

    knowledgebase.progress.com/.../20602