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)))
ASKER
@NetRcvBal = {@TotalRcv} - {@NetDef'dInc} - {LPlusLeaseVW.lease_securi ty_deposit _amt}
{@TotalRcv} =if {LPlusLeaseVW.lease_earn_c ode} = 12 then 0 else if {LPlusLeaseVW.lease_note_s eq_num} < 1 then {LPlusLeaseVW.lease_curr_r ecv_amt} + {LPlusLeaseVW.lease_recv_b alance} else if {LPlusLeaseVW.lease_note_s eq_num} > 1 and {LPlusLeaseVW.lease_disc_p mts_retain ed} = 0 then 0 else {@PmtsRetained-AF-Disc}
{@PmtsRetained-AF-Disc} = if {LPlusLeaseVW.lease_note_s eq_num} > 1 and {LPlusLeaseVW.lease_disc_p mts_retain ed} > 0 then 0 else 0
{@NetDef'dInc} = {LPlusLeaseVW.lease_def_in come_lease } - {LPlusLeaseVW.lease_earn_t o_date_lea se}
Thx
{@TotalRcv} =if {LPlusLeaseVW.lease_earn_c
{@PmtsRetained-AF-Disc} = if {LPlusLeaseVW.lease_note_s
{@NetDef'dInc} = {LPlusLeaseVW.lease_def_in
Thx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What was your resolution?
mlmcc
mlmcc
You probably will have to use formulas to do the totaling.
mlmcc