Crystal Reports - Running Total is duplicating if a group has more than 1 "detail" - crystal-reports

I have a report that I am trying to get working in Crystal. Basically the report is about gifts (I work for a non-profit). I grouped the report by Payment Method, and then Gift ID, which is a unique field in the .MDB file used to fuel the report.
I want to keep gifts with the same payment method together, which is why I first grouped by that. Then I grouped by Gift ID. the "Details" of my report is a field called Soft Credit Donor, which will list out as many donors that were given soft credit on the gift. There could be 0, there could be multiple...I show running totals in the Report Footer. I have a Gift Count (a Distinct Count of Gift ID, evaluating on each record, resetting Never), a Sum of all Gifts (a sum of Gift Amount, evaluating on Change of Field - Gift ID, resetting Never). These 2 fields work fine.
Then I get to where I want a running total based on each Payment Method. I am able to easily show the # of gifts per payment method. I do this with 4 separate running total fields (one for each payment method). I am doing a Distinct Count on GIft ID, evaluating on a formula (payment_method = "Business Check", "Personal Check", "Credit Card", etc...and Resetting Never.
My issue is when I try to do a $$ total for each payment method. In this case I am seeing that my running total is duplicating if there is more than 1 "detail" or soft credit donor. My running total field is doing a sum of the Gift Amount field, evaluating on a formula (payment_method = "business check", etc...), and I've played around with the Resetting. If I choose Resetting Never, then I am seeing the money being double or triple, etc...counted. Depending on if gift has more than 1 "detail". If I choose to reset on change of field and I set that to either Payment_Method or GiftID, I get a blank running total.
One thing to mention is that my MDB file has multiple tables that are all left outer joined to the main table which holds the Gift ID and Payment method fields. So there is a Soft_Credit table that holds the Gift ID field, along with the each name of the Donor who gets a soft credit. I'm not sure if that matters or not.
I'd appreciate any help!

You can put this in a formula:
If {payment_method} = "Credit Card" Then 1 Else 0
Use this formula as sum in the running total.
Use "on change" on the id field.
User "never reset" for the total sum.
You have to create one formula and one running total for each payment method.

Related

Suppressed Data being calculated on a count

I am trying to get a count of records for a the Charge Group; however it is counting my suppressed data as well. I understand that suppressed data is only hidden and doesn't effect any calculation, but how can I adjust my formula so it doesn't take the suppressed data.
I attempted to do a running total field however I receive an error
A running total cannot refer to a print time formula Details: #Customer Drop Max Amount
Within the report there are multiple Trailer Charge Groups that are basically shippers and their destinations are marked as Drop Customers
I only want one record for two Drop Customers to be computed, so whenever another trailer falls into the record for Drop Customer I have to change the count field to show that their should only be one.
The formula field I am doing that for is Charge group count
IF {#TRAILER CHARGE GROUP} = 'INTCNEWNC' THEN Count ({TRAILER_CUSTOMER_ZONE.TRAILER_ID} , {#TRAILER CHARGE GROUP}) - 6
ELSE IF {#TRAILER CHARGE GROUP} <> 'INTCNEWNC' THEN Count ({TRAILER_CUSTOMER_ZONE.TRAILER_ID}, {#TRAILER CHARGE GROUP} )
I am using Crystal Reports XI on a DB2 server.
Thanks in advance!
edit: INTCNEWNC is the charge group, whereas ASHLADVNC and MARSBIVA are the drop customers. You can clearly see the individual counts for Drop customers are fine but the count for charge groups is where I am struggling.
1) Create running total fields for both the specific drop customer and charge group.
2) A formula field stating
IF CHARGEGROUP = 'MY CHARGE GROUP' then (rt.charge group) - (rt.drop customer 1) - (rt.drop customer 2) + 2 else count(trailer)

Crystal Reports how can I suppress a group where only one detail record exits

I have a report that groups our invoices by invoice number and details by doc type, original, credit, and rebill.
I want the report to show only those invoices where all three doc types exit.
Obviously 99% of our invoices do not have credit and rebills. Thanks for any help.
Create an invoice group counter by doc type and place a formula on your invoice group Section Expert, suppress condition that suppress that section if invoice group counter <> 3. This is a solution only if your invoice always have original, credit, and rebill one time. If you could have 2 or more originals, credits, and rebills this won't work.

crystal report group on multiple criteria

This is a strange scenario that I'm having trouble working out:
I have a report that needs to show the summary of donations that each board member gave/got in any fiscal year. They get credit for hard credit donations, soft credit donations, and solicited donations. Meaning their record ID number is in 3 columns throughout the spreadsheet.
So, my data looks like this:
Soft Credit ID/Hard Credit ID/Solicitor ID/Gift Amount
1/-/-/$50
-/1/-/$100
-/-/1/$250
I need to be able to group these records together because they each have the ID # "1" in the record (but in a different column each time). I need to group these records together, so that it shows the summary for each board member, with the details below:
Board member ID 1: Total Giving $400
Soft credit - $50 - 4/1/13
Hard Credit - $100 - 3/29/13
Solicitor Credit - $250 - 7/2/13
(^These don't need to be summaries, this just needs to list all gifts and which kind of credit they give)
I'm having trouble because I don't see a way to group based on the ID, in different fields. I tried grouping based on a formula for each board member (formula read {Hard Credit ID}="1" OR {Soft credit ID}="1" OR {solicitor credit}="1") but it didn't work and it creates a hierarchy that I'm not looking for. Apologies for the formatting - I can't find instructions on how to make that block above appear as a table.
One way to do it, depending on your source DB, is to use a SQL Expression to condense the three fields:
coalesce({table.SoftCreditID},{table.HardCreditID},{table.SolicitorID})
Or you can do it in a regular formula:
if not(isnull({table.SoftCreditID)) then {table.SoftCreditID}
else if not(isnull({table.HardCreditID})) then {table.HardCreditID}
else {table.SolicitorID}
Replace nulls in the three fields with 0 and then concatenate. You will then have a possibility of three values in the new field: 100 010 001
If you concatenate the three ID fields into a new field without replacing the nulls then you will get "1", "1" and "1". If you replace the nulls with 0, then you will get "100", "010", and "001". Now, you can group-by on the new field and you will get subtotals, or skip-group-by and just list the detail. To extract the description of the code, if we are only talking about 3 possible values, you can use nested if statements to examine first value and test if it equal to "100", else test if equal to "010", else test if equal to "001", else error. Or a case statement, syntax examples here: Select/Case in Crystal Reports or Crystal Reports SELECT CASE statement

Paypal IPN using PHP to get customized Quantity and Amount

I have downloaded the sample paypal IPN script using php and customised with the email for the buyout option and it has also some hidden paramaters such as amount, quantity,return_url, notify_url like this. My main idea is to do the buyout option for the product purchase in my website.The current calculation for the product purchase is as follows:
Item Price:$20
Quantity :10
Total amount $200
I need the calculation to some different way as our site have some static set of quantities and prices, so our point of calculation is as follows:
Item Price:$20
Quantity :10
Total amount:$20
So, the total amount needs to be the same for the given number of quantities.The IPN configuration doesn't allow me to change the quantity field by this way, please suggest some ideas to overcome this issue.
The item price is price per item, the quantity is of course multiplied by the item price. Your second example should have $2 as the --Item-- price. If you want to sell "10 items for $20", I think you will need to make a new item for that combo and just but the actual quantity in a custom field.
If you want to use the same item and paypal's quantity field, I think you need to look into calculating a discount and making that part of the parameters (discount_amount_cart or discount_amount_X for item X I think).

Paypal Discount When purchasing two + items (not two instances of same object)

Paypal has listed out methods for discounts such as :
discount_amount
Optional
Discount amount associated with an item.
It must be less than the selling price of the item. If you specify discount_amount and discount_amount2 is not defined, then this flat amount is applied regardless of the quantity of items purchased.
Valid only for Buy Now and Add to Cart buttons.
discount_amount2
Optional
Discount amount associated with each additional quantity of the item.
It must be equal to or less than the selling price of the item. A discount_amount must also be specified as greater than or equal to 0 for discount_amount2 to take effect.
Valid only for Buy Now and Add to Cart buttons.
I understand that you can have a discount associated with the amount of the same object inside of the cart. I'm wondering if anyone knows a way or method to allow a discount to show up if you say add 3 items or 5 items. Basically the situation is users have the option of signing up for either 1-4 courses. If a user signs up for 1 normal price(lets say 30) occurs. If a second is added they would receive a 10 dollar discount on the tuition(50). Than if a third is added it would show up as the regular method (resulting in 90) However if a fourth is added it would be a charge of 3 courses plus 50. (95). Is there any solution to presenting this to paypal to update based on amount of items (each being different items[different course dates and names]) included in your cart?
If it's for the whole cart and not just the item use discount_amount_cart
Remember discount_amount_1 has to be less in value than amount_1