2017-09-19 81 views
0

程序應處理任何鏈接到瀏覽的表格意味着它應該是通用的。 請幫忙。通用程序從瀏覽中生成報告4gl

/* below code is sample to Show the data in message box , 
     but only first data it is showing right now.*/ 

    DEFINE INPUT PARAMETER hRecord AS WIDGET-HANDLE. 
    DEFINE INPUT PARAMETER hQuery AS WIDGET-HANDLE . 

    DEF VAR hFld  AS HANDLE NO-UNDO. 
     DEFINE VARIABLE iCOunt AS INTEGER INITIAL 0. 
     DEFINE VARIABLE i AS INTEGER NO-UNDO. 
     DEFINE VARIABLE j AS integer INITIAL 1. 


     MESSAGE hRecord:NUM-COL VIEW-AS ALERT-BOX. 

     DO WHILE TRUE: 
       hQuery:GET-NEXT(). 
       iCount = iCount + 1. 


       DO i = 1 TO hRecord:NUM-COL: 
         hfld = hRecord:GET-BROWSE-COL(i). 
        MESSAGE hfld:SCREEN-VALUE. 

       END. 
        j = j + 1. 


     END. 
     MESSAGE iCount VIEW-AS ALERT-BOX. 
    END PROCEDURE. 
+0

你應該顯示一些努力,並至少發佈一些代碼,試圖做你想做的事... – Jensd

+0

這是一個問題嗎? –

回答

2

你可以得到一個緩衝場像這樣:

hfld = hRecord:GET-BUFFER-FIELD(i). 

然後獲取字段的值:

DISPLAY hfld:BUFFER-VALUE. 

請參閱該文檔爲這些東西做一個解釋。

+1

謝謝Tim Kuehn –