Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Graph in form
Message
De
21/09/1998 18:42:46
 
 
À
21/09/1998 18:35:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00139299
Message ID:
00139302
Vues:
34
>hi all
>how can i (in vfp 30)get the values of trhee columns of my grid1 show a graphic
>like barr or pie in the same form wher the grid its? and refresh the
>graph when the values refresH?
>
>TNX
Hi Augusto.

You can use code like this to resfresh the data in the graph from the data in the RecordSource of the grid:
LOCAL iCounter
SELECT GraphBmp
ZAP
APPEND BLANK
REPLACE GraphBmp WITH MakeGrph.Graph
SELECT GraphDat 
cGraphString = "" 
* Build tab-delimited string of field names: 
FOR iCounter = 1 TO FCOUNT("GraphDat")
    IF UPPER(ALLTRIM(FIELD(iCounter))) <> "REGN_CD" AND ;
       UPPER(ALLTRIM(FIELD(iCounter))) <> "FAC_CD"
       cGraphString = cGraphString  + FIELDS(iCounter) ; 
                    + IIF(iCounter < FCOUNT("GraphDat"),CHR(9),chr(13)) 
    ENDIF
ENDFOR 

 * Concatenate the data, converting numeric fields to character: 
 SCAN 
    FOR iCounter = 1 TO FCOUNT("GraphDat")
        cGraphString = cGraphString  + IIF(TYPE(Fields(iCounter))='C',; 
                       EVALUATE(FIELDS(iCounter)) ; 
                       ,str(EVALUATE(FIELDS(iCounter)),16,2); 
                              ); 
                       + IIF(iCounter < FCOUNT("GraphDat"),CHR(9),CHR(13)) 
    ENDFOR 
 ENDSCAN 
 SELECT GraphBmp 
 APPEND GENERAL GraphBmp  DATA cGraphString 
RETURN
Marcia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform