#DEFINE cr CHR(13) #DEFINE tab CHR(9) USE datafile IN 1 USE grphfile IN 2 SELECT datafile cGraphString = "" * Build tab-delimited string of field names: FOR iCounter = 1 TO 5 cGraphString = cGraphString + FIELDS(iCounter) ; + IIF(iCounter tab,cr) ENDFOR * Concatenate the data, converting numeric fields to character: SCAN FOR iCounter = 1 TO 5 cGraphString = cGraphString + IIF(TYPE(Fields(iCounter))='C',; EVALUATE(FIELDS(iCounter)) ; ,str(EVALUATE(FIELDS(iCounter)),16,2); ); + IIF(iCounter tab,cr) ENDFOR ENDSCAN SELECT grphfile APPEND GENERAL mgraph DATA cGraphString NOTE: Under Windows 95 and Windows NT, adding the clause CLASS "MSGraph" to the * APPEND GENERAL command causes a new, default graph to be created regardless of any * existing graph or other type of object stored in the mgraph field * (including if it were empty). * You may pass data to a graph object without overwriting the existing formatting by * omitting the CLASS clause as above. * Using the following code in the above example creates a new graph * under Windows 95 or Windows NT, rather than placing the data into the existing graph: APPEND GENERAL mgraph CLASS "MsGraph.Chart" DATA cGraphString