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

Formula changing items within 1 field

Status
Not open for further replies.

damselx

Technical User
Apr 24, 2003
32
AU
Hi
I realise what I'm trying to do at the moment is fairly basic ..... but am so stuck !!

Have a report with half a dozen columns going width page.
2 columns having problem with
1 is transaction type
other is net value
Problem: transaction type is made up of various categories from another database
ie: CBREC, DRINV, DRCDT, DRJNL
When the file is picked up from the other database using a dictionary, the dictionary has been altered to reverse the $ value
So I have
TRANS TYPE NET VALUE
CBREC 1000.00
DRINV 200.00
(CBREC being Cash Book Receipt & should be -1000.00 & DRINV being debtors invoice & is correct to be 200.00)
I need to be above to reverse 'just' the CBREC records, & I have to reverse them, not switch them all to negative in case there was a negative transaction put through in the first instance.
If I right click on the 1000.00 & choose format field & set it to reverse, it reverses everything within the column

How do I set it so just the CBREC records reverse?

I've asked quite a few people today, well I've actually spent all day on it, so any help I can get here will be very much appreciated

Thanks
Helen
 
Replace {netvalue} with this formula:

If {transvalue} = "CBREC" then -{netvalue} else {netvalue}

-LB
 
thanks for getting back to me

I tried this & it gave me an error that it must be a boolean

Any ideas ?
 
Not sure what happened, but I've got it to work. Problem now is I've got it grouped by state, & each grouping holds various transactions - CBREC & DRCDT which I have forced to a negative by using formula above, & DRJNL & DRINV which are debits, or credits originating from the original database

It adds up the originating credits fine, but the ones that have been forced to negative it still adds up as a debit.

Not sure what to do

Helen
 
Are you summing the database field, or summing the formula? It sounds as if you're doing the former, but you need to be doing the latter.

Just right click LB's formula, and insert a fresh summary at group level.

Naith
 
Thanks ... that's exactly what I was doing wrong
Helen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top