SUM Problem (or Trick), How to use "smart" SUM

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

Q:

Does anybody know how to do next SUM?

1. How to put SUM of all fields on one page in the footer of that page?

2. How to transfer this sum ( point 1) to the header of the next page ( page + 1)?

3. How to transfer this sum and all other sum of another page on the last page?

A:

place memos in the footer and use sumfunctions extended syntax

ie

mdband name band1

has 3 memos containg [tbl."fld1"] [tbl."fld2"] [tbl."fld3"]

in footer

3 memos each would contain [Sum([tbl1."fld1"],band1,1)] and so on.

better to use a column footer and column header band

for the same memos in the colum header

use an if function

[if expression truevalue,falsevalue] in each memo

[if [page#]> 1 ,[Sum([tbl1."fld1"],band1,1)],0] and so on

build the memos expression using the expression builder to get the syntax correct.

if this does not give you the correct totals in the header

then you will have to make report 2pass

and use arrays to gather each field's sum in footer on first pass

and then use an if finalpass then code block in the obp of the header sub the values stored in the arrays

if you need info on arrays see the reports demo grouptotals in header for an example.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航