Counting Periods CW2003
Author Message
Counting Periods CW2003

Hi All,

I have an APP written in CW2003 which calculates various loans starting
at the present value and computing to zero.  The App calculates a number
of loans with different amounts and interest rates, at the same time.
Everything works fine except I haven't
figured out a method to show how many months the payoff  takes for each
loan.  At present the months are counted by the number of times the
computing processed has looped through the code to reach zero for the
largest loan.

My code is as follows:

Loop until  Fil:balance2 <=0

if fil:balance1>0 then
fil:interest1=fil:balance1 * fil:intrate1/12
etc
if fil:balanc2 >0 then
fil:interest2=fil:balance2 * fil:intrate2/12
etc

In the report detail, I have entered a field (fil:months) and gave it a
"count" property.  Thus it counts for each calculaton made and it's
total count is the number of months needed to
payoff the largest loan. I want to be able to print the count when loan
one is payoff as well as loan two is paid off without printing a report
of 360 months/lines and thumbing back to see at which month loan one was
paid of i.e. 40 months/lines.

I was thinking Pointer, but not sure where to start?  Any help would be
appreciated.

chuck bolland

Mon, 11 Mar 2002 03:00:00 GMT
Counting Periods CW2003

Quote:
>Hi All,

>I have an APP written in CW2003 which calculates various loans starting
>at the present value and computing to zero.  The App calculates a number
>of loans with different amounts and interest rates, at the same time.
>Everything works fine except I haven't
>figured out a method to show how many months the payoff  takes for each
>loan.  At present the months are counted by the number of times the
>computing processed has looped through the code to reach zero for the
>largest loan.

>My code is as follows:

Data
PayoffMonths       Short, Dim(x)

then
Clear(PayoffMonths)

Quote:
>Loop until  Fil:balance2 <=0

>  if fil:balance1>0 then
>    fil:interest1=fil:balance1 * fil:intrate1/12
>   etc

PayOffMonths(1) += 1
end
Quote:
> if fil:balanc2 >0 then
>  fil:interest2=fil:balance2 * fil:intrate2/12
>etc

PayOffMonths(2) += 1
end
Then you can have the report print
Loan               1                                   2 ...

Payoff   PayoffMonths(1)     PayoffMonths(2)....

HTH
Ed

Mon, 11 Mar 2002 03:00:00 GMT

 Page 1 of 1 [ 2 post ]

Relevant Pages