• Status: Solved
• Priority: Medium
• Security: Public
• Views: 419

# 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)))
``````
0
cfnbc
• 2
• 2
1 Solution

Commented:
What is the @NetRcvBal formula?

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

mlmcc
0

Author Commented:
@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
0

Author Commented:
Found my own resolution.
0

Commented:

mlmcc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.