Link to home
Start Free TrialLog in
Avatar of cfnbc
cfnbc

asked on

Problem Summarizing Formula Field

I am using crystal 10 to create a report on leases.  I am basically done except for this one last step.  With the code below, I am asking my report to take the balance of Lease#1 and then divide that balance by the sum of all my lease balances multiplied by the difference (in days) between the leases maturity date and current date.  I put this field on my report and it calculates perfectly for each lease.  My last step and the problem is to sum up this calculated information and divide by 365 which will give me one final number, "weighted average maturity in years".  Since I am summing in the code below (Sum ({@NetRcvBal})), crystal will not allow me to do the final summary and divide by 365.  Now if I replace (Sum ({@NetRcvBal}) with a number like 100, I am allowed to summarize this field.  So I know my problem is trying to perform a double summary.  Was hoping for a way around this?  Thx
ToNumber ((({@NetRcvBal}/Sum ({@NetRcvBal}))*({LPlusLeaseVW.lease_maturity_date}-CurrentDate)))

Open in new window

Avatar of Mike McCracken
Mike McCracken

What is the @NetRcvBal formula?

You probably will have to use formulas to do the totaling.

mlmcc
Avatar of cfnbc

ASKER

@NetRcvBal  = {@TotalRcv} - {@NetDef'dInc} - {LPlusLeaseVW.lease_security_deposit_amt}

{@TotalRcv} =if {LPlusLeaseVW.lease_earn_code} = 12 then 0 else if {LPlusLeaseVW.lease_note_seq_num} < 1 then {LPlusLeaseVW.lease_curr_recv_amt} + {LPlusLeaseVW.lease_recv_balance} else if {LPlusLeaseVW.lease_note_seq_num} > 1 and {LPlusLeaseVW.lease_disc_pmts_retained}  = 0 then 0 else {@PmtsRetained-AF-Disc}

{@PmtsRetained-AF-Disc} = if {LPlusLeaseVW.lease_note_seq_num} > 1 and {LPlusLeaseVW.lease_disc_pmts_retained} > 0  then 0 else 0

{@NetDef'dInc} = {LPlusLeaseVW.lease_def_income_lease} - {LPlusLeaseVW.lease_earn_to_date_lease}

Thx
ASKER CERTIFIED SOLUTION
Avatar of cfnbc
cfnbc

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What was your resolution?

mlmcc