Welcome to Forums Sign in | Join | Help | Forums
in Search


Summaries & Subtotals: How to get the value of one summary minus another??

Last post 10-15-2008 11:15 AM by Tera Ellefson. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-22-2008 5:04 AM

    • Louise Young
    • Not Ranked
    • Posts 3
    • Organization: National Galleries of Scotland
    • Products:  The Raiser's Edge

    Summaries & Subtotals: How to get the value of one summary minus another??

    Hi, Can anyone help?

     I'm using the subtotal/group function to sum each different gift type - pledge, cash, paycash etc

    However I'm making a pledge report and I'd like to have a final total the bottom that take the pledge total and subtracts the pay-cash total. So basically I get an overall total of pledges, cash paid to these pledges, and then amount outstanding.

     I can't find anywhere on crystal for me to take one grouped total from another. Has anyone else managed this?

     Thanks

  • 10-14-2008 12:33 PM In reply to

    Re: Summaries & Subtotals: How to get the value of one summary minus another??

    I had a similar, but not the same problem--I wound up writing a formula that substituted the "Pledge Balance" for the "Gift Amount" for pledges, and that at least got my totals correct.

    What I am trying to figure out is how to move subtotals for specific groups into the group "around" it...  I am writing a report that lists gifts for our FY09 Campaign.  The gifts are grouped by appeal (Group 1) and subtotaled in that group; and they are grouped within the appeal by gift type (Cash, Pay-Cash, Pledge etc.) and again subtotaled in the footer of Group 2. 

    What I would like is to repeat the subtotals for various Gift Type groups (Group 2) in the footer of Group One, so that I could have the totals paid (by summing the Cash & Pay-Cash subtotals) and pledged for that appeal.  I've tried to create If-Then Sum formulas (like If gift type = cash then sum gift amt), but those formulas only work when, for example, I'm summing cash gifts and there are only cash gifts in the appeal--if there are also pledges or pay cash, the amount comes to 0.  Has anyone else been able to do this?

  • 10-14-2008 5:42 PM In reply to

    • Drew Allen
    • Top 10 Contributor
    • Posts 514
    • Organization: Children's Hospital of Philadelphia
    • Products:  The Information Edge, The Raiser's Edge

    Re: Summaries & Subtotals: How to get the value of one summary minus another??

    Crystal formulas are generally localized.  That is, you only have information about any one group at a given level at a time.  In other words, if you have information about Pledges--such as the total--, then you cannot get information about Gifts, because Gifts and Pledges are in different groups at the same level.

    Another way of putting this, is that Crystal formulas are single valued.  That is, the sum of the same field (Amount) for the same group (Group 2) can only have one value in a given place (Group 1 footer).

    The way to get around this is to sum different fields.  You do this by creating a separate formula for each gift type.   You output the gift amount when the current gift matches the appropriate gift type and zero otherwise.  Then you would use the sum of these formulas in the group 1 footer.

    Drew

    J. Drew Allen
    The Children's Hospital of Philadelphia
  • 10-15-2008 11:15 AM In reply to

    Re: Summaries & Subtotals: How to get the value of one summary minus another??

    That's what I've wound up doing--I've made a formula field that exports $0.00 unless it's cash or pay-cash, put the field in Details, and then I've suppressed it so it doesn't show in the columns, and put a summary in the group 1 footer. 

     The formula looks like this:

     IF {Gf.Gf_Type} = "Cash" THEN {@SubOutBalance} ELSE (IF {Gf.Gf_Type} = "Pay-Cash" THEN {@SubOutBalance} ELSE CCur(0.00))

    @SubOutBalance is the field I was talking about above, where the pledge balance is substituted for the gift amount.  I assume other people would just use Gift Amount.  I did the same formula for the pledges.

    Thanks so much for your help!

Page 1 of 1 (4 items)