if file('calc_values.dbf') drop table calc_values endif if not file('calc_values.dbf') create table calc_values (id autoinc,a numeric(10,2),b numeric(10,2),; c numeric(10,2),d numeric(10,2),e numeric(10,2)) insert into calc_values (a,b,c,d,e) values (4.00,5.00,8.00,12.00,76) insert into calc_values (a,b,c,d,e) values (5.00,9.00,45.00,100.00,50) endif ** END HEADER -- do not remove this line // // Generated on 2018-12-09 // parameter bModal local f f = new sql_calcForm() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif class sql_calcForm of FORM with (this) height = 16.0 left = 21.4286 top = 1.7273 width = 190.2857 text = "" endwith this.CALC_VALUES1 = new QUERY(this) with (this.CALC_VALUES1) left = 4.0 top = 1.0 width = 10.0 height = 1.0 sql = 'select a,b,c,d,e as Fahrenheit,5*(e-32)/9 as Centigrade_calc,' sql += 'b-a as f_calc,(d-c)/d*100 as percent_c_of_d_calc from "calc_values.DBF"' active = true endwith this.GRID1 = new GRID(this) with (this.GRID1) dataLink = form.calc_values1.rowset height = 4.0 left = 4.0 top = 4.5 width = 179.0 endwith this.rowset = this.calc_values1.rowset endclass