Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula not bringing in negative credits

Status
Not open for further replies.

grecon

Technical User
Mar 8, 2007
78
US
Hi I have a formula:

not {PAYLIST.DELETED} and
not {PAYLIST.BADPAYMENT} and
not ({PAYLIST.AMOUNT} in 0.00 to 0.00) and
{PAYLIST.PAY_DATE} in {?Start Date} to {?End Date} and
{PAYTYPES.LIST_NAME} in [" - Acct Adj", " - AMEX - RA", " - Discover - RA", " - Mastercard - RA", " - Visa - RA", "$ - Cash", "1 - Web - Credit Car", "2 - Suffolk tax", "6 - Contra", "A - American Express", "C - Check", "M - MasterCard", "R - Discover", "V - Visa", "W - Wire Transfer"] and
not {PAYLIST.HOLD}

but it is not bringing in my negative credits in my paylist, I do have another table called creditledger but if I include that it seems to throw my numbers off completely. Is there something I should be adding to the paylist.amount as seen above that will bring in the negative credits. My numbers are correct with the exception of not showing the negative credits. Thanks
 
Can you verify that the {paylist.amount} shows credit amounts if you place it directly in your detail section? There is nothing obvious in your formula that would rule them out (although you are missing lots of parens--should be not({table.field}).

-LB
 
Hi,
In addition to LB's comments, why use a range like:
not ({PAYLIST.AMOUNT} in 0.00 to 0.00)
when
{PAYLIST.AMOUNT} <> 0 would probably be more efficient.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I do have another table called creditledger but if I include that it seems to throw my numbers off completely
If you link table A to table B and there are several Table B records for each table A, you get one detail line for each Table A / Table B combination. The normal solution is to group by some account number in Table A and total. You also may need to use a 'Left Outer', i.e. include Table A entries without a matching Table B entry.

As for your actual test, if the suggestions given do not solve it, try showing the raw data along with the indivudal tests as separate formula fields. E.g.
Code:
{PAYLIST.PAY_DATE} in {?Start Date} to {?End Date}
This would show True or False, or would be blank if you hit a null. (Could nulls be the issue?)

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top