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

How do you print a previous record value?

Status
Not open for further replies.

cab1

Programmer
Jun 7, 2001
5
US
This report is a calendar year report showing by month the rollup’s that took place in the previous months. Each month is represented as a single line on the report. The report is a summary only. One of the columns on the report called Distributed Balance is calculated as follows:
If {CASH_BALANCE.DISTRIBUTION_CODE} = "P" then
{CASH_BALANCE.ENDING_BALANCE}
else 0

We want to show the balance ending in the month prior to the distribution month. The problem is we are showing the distribution month's balance which is zero.

This report is ordered by participants within ascending date in order to get monthly summaries.

 
Previous({CASH_BALANCE.ENDING_BALANCE})
may be the function you are looking for.

Cheers,
- Ido
 
I tried Previous before and it did not work. Any other ideas? Thanks.
 
You may be filtering out the information you need - for example, if you want the {CASH_BALANCE.ENDING_BALANCE} for 2000/12/31 for a report covering the period 2001/01/01 to 2001/03/31, then you will have to include data from the prior period in order to get the ending balance for the prior period. You can suppress the display of prior period results, but unless you have a {CASH_BALANCE.OPENING_BALANCE} field to use, you will need that info for your report calculations.
Malcolm Wynden
I'm for sale at malcolm@wynden.net
 
No. Filtering is not the problem. Is there a way to store the previous month's value and then use it for the current calculation? Thanks.
 
Is the previous month value a total?
If it is, then the Previous() function can't be used.

Instead, use a Variable.

One approach is to present the info in a Group
Header and Reset the variable from the previous
group only after using it for presentation.

You can control the sequence using the
EvaluateAfter() function.

I've done this before for exactly this purpose
and it works.

Cheers,
- Ido
ixm7@psu.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top