Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum from pages

Status
Not open for further replies.

Asia001

Programmer
Jan 19, 2005
16
PL
Hi,
How copy value from page to next page. I have sum from first page (for example 2) and on next page I have this sum.

first page: second page:
sum previous page: 0 sum previous page: 2
sum this page: 2 sum this page: 8

How copy value 2 from first page to second page?
 
I have created an example that might help you on your way.
Use the Xtreme sample database included with the product. Add the customer table only.
Insert {Customer.Customer name} and {Customer.Last Year's Sales} in the details section.

Create 4 forumlas:

{@init} (insert it in the report header)
WhilePrintingRecords;
global currencyvar addup;
addup:=0;

{@update} (insert it in the details section]
WhilePrintingRecords;
global currencyvar addup;
addup:=addup +{customer.last year's sales}

{@displayPageFooter} (insert it in the page footer)
WhilePrintingRecords;
global currencyvar addup;

{@displayPageheader} (insert it in the page header)
WhilePrintingRecords;
global currencyvar addup;
addup-{customer.last year's sales};


 
OK! Everything is good when I have data different 0. Whan I have page with all value 0, next page have bad value: sum before page.
What do You think about this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top