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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fox Pro Report - Cumulative Value

Status
Not open for further replies.

mherz715

Programmer
Apr 4, 2012
17
PH
Good day!
I would like ask, how I am able to show a cumulative value in FoxPro REPORT???
Below is the example report that I want to display:

Description DEBIT CREDIT BALANCE
Beginning Balance 4,000.00 1,500.00 2,500.00
CRB 1/2011 1,000.00 500.00 3,000.00
CRB 2/2011 2,000.00 2,700.00 2,300.00

Thanks in advance.
 
You need to add a report variable. You do that from the Report menu (Report / Variables ...).

In the resulting dialogue, click the Add button to add a new variable. Specify a name for it.

In the Calculation Type box, select Sum. Enter appropriate values for the other boxes.

Then add a new field to the report, where you want your running totals to appear. For its expression, just enter the name you specified for the report variable.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
In this, as Balance needs to be inited with Debit-Credit of the first row and then you sum Debit-Credit. Overall this is a Sum of the expression Debit-Credit.

Bye, Olaf.
 
If you are not already familiar with VFP reporting, you might want to look at:
Of particular interest might be:
Basic Reporting - Pt. 1
Basic Reporting - Pt. 2

Note - new reporting capabilities were introduced with VFP9, but these should cover the basics.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top