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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formula problems

Status
Not open for further replies.

patty1

Programmer
Apr 17, 2002
105
US
The below formula will not give me the "Gross Amounts" for the fourth line of logic. This formula works if I separate it out and it works in the exact layout in sql query but when I put it in report it seems to ignore the Transaction_History.Social_Code} = "059") part. Any ideas?


To spell it out- I don't want any dealer#s that equal 0040000 or 0468 - I do want any fundsgroup2 that equal 59 or 58 and I do want any social codes that equal 059

All should be trade type that equals P


if
({Transaction_History.Dealer_Number} <> '0040000' AND
{Transaction_History.Dealer_Number} <> '0468') AND
(({Funds.FundGroup2} in [&quot;59&quot;, &quot;58&quot;]) or
{Transaction_History.Social_Code} = &quot;059&quot;) and

{Transaction_History.Trade_Type} = 'P'
then {Transaction_History.Gross_Amount}
 
Try this one:
I don't want any dealer#s that equal 0040000 or 0468 - I do want any fundsgroup2 that equal 59 or 58 and I do want any social codes that equal 059

All should be trade type that equals P


if
(not({Transaction_History.Dealer_Number} in [&quot;0468&quot;,&quot;0040000&quot;])
or
{Funds.FundGroup2} in [&quot;59&quot;, &quot;58&quot;]
or

{Transaction_History.Social_Code} = &quot;059&quot;)
and
{Transaction_History.Trade_Type} = &quot;P&quot;
then {Transaction_History.Gross_Amount}
Mike
 
never mind all - I created 3 separate formulas and got my sums and running totals that way - although there should be a way to have gotten the info in one formula I'm sure but I just couldn't get it. If you do know how, I would love to know the answer even though I got what I need.
 
Mike - it give me the 59, 58 and 059 but it also gives me everything else - Thanks for taking the time thought
 
How about this one then?:

if
({Funds.FundGroup2} in [&quot;59&quot;, &quot;58&quot;]
or
{Transaction_History.Social_Code} = &quot;059&quot;)
and
{Transaction_History.Trade_Type} = &quot;P&quot;
and not({Transaction_History.Dealer_Number} in [&quot;0468&quot;,&quot;0040000&quot;]

then {Transaction_History.Gross_Amount}
Mike
 
This one does not give me the 059's - at least I know it wasn't me! I still don't know why they don't work - they sound and look so right!!
 
Do you get the &quot;059&quot;s if you take this line out?

and not({Transaction_History.Dealer_Number} in [&quot;0468&quot;,&quot;0040000&quot;]

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top