Problem Summarizing Formula Field

Posted on 2009-02-10
Last Modified: 2012-06-21
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

Question by:cfnbc
    LVL 100

    Expert Comment

    What is the @NetRcvBal formula?

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


    Author Comment

    @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}


    Accepted Solution

    Found my own resolution.
    LVL 100

    Expert Comment

    What was your resolution?


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now