其他语言

本类阅读TOP10

·基于Solaris 开发环境的整体构思
·使用AutoMake轻松生成Makefile
·BCB数据库图像保存技术
·GNU中的Makefile
·射频芯片nRF401天线设计的分析
·iframe 的自适应高度
·BCB之Socket通信
·软件企业如何实施CMM
·入门系列--OpenGL最简单的入门
·WIN95中日志钩子(JournalRecord Hook)的使用

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
SUM Problem (or Trick), How to use "smart" SUM

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

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.




相关文章

相关软件