Examples Using COMPUTE This SELECT statement uses a simple COMPUTE clause to produce a grand total of the sum of the price and advances from the titles table:USE pubsSELECT type, price, advanceFROM titlesORDER BY typeCOMPUTE SUM(price), SUM(advance)
zwhc 这些都写在代码编辑器中吗?
你的问题不能说是计算字段的问题: 程序如下: var j:real; begin j:=0; query1.first; while not query1.eof do begin j:=j+query1.fieldbyname('价格').asfloat; query1.next; end; lable1.caption:=floattostr(j);//总计放在FORM的LABLE1中显示; end; 关于在报表中,你可以使用一个QRTLABLE部件(放在PAGEFOOTER中),在 PAGEFOOTER的beforeprint事件中编程如下: QRTLABLE1.caption:=form1.lable1.caption; 就行了。。 给分吧。
amyfun >>这些都写在代码编辑器中吗?不是我觉得该问题用 Comput 关键字即可解决故给你发了份 SQL Sever Onlin 上的例子。
amyfun >>这些都写在代码编辑器中吗?不是,我觉得该问题用 Comput 关键字即可解决,故给你发了份 SQL Sever Onlin 上的例子。
是你吗?
QREXPRE的表达式如何写?
(我的表为Book.db,价格字段为jiage,每一本书对应一个价格,如何在Form与报表中作呢?)
This SELECT statement uses a simple COMPUTE clause to produce a grand total of the sum of the price and advances from the titles table:USE pubsSELECT type, price, advanceFROM titlesORDER BY typeCOMPUTE SUM(price), SUM(advance)
这些都写在代码编辑器中吗?
程序如下:
var j:real;
begin
j:=0;
query1.first;
while not query1.eof do
begin
j:=j+query1.fieldbyname('价格').asfloat;
query1.next;
end; lable1.caption:=floattostr(j);//总计放在FORM的LABLE1中显示;
end;
关于在报表中,你可以使用一个QRTLABLE部件(放在PAGEFOOTER中),在
PAGEFOOTER的beforeprint事件中编程如下:
QRTLABLE1.caption:=form1.lable1.caption;
就行了。。
给分吧。
>>这些都写在代码编辑器中吗?不是我觉得该问题用 Comput 关键字即可解决故给你发了份 SQL Sever Onlin 上的例子。
>>这些都写在代码编辑器中吗?不是,我觉得该问题用 Comput 关键字即可解决,故给你发了份 SQL Sever Onlin 上的例子。