no, I wanted you to create a fomula field that will look at the Flag field. If it is = to "I" then it muliplies the amount field by negative one (making it a negative value), if it is <> to "I" it multiplies the amount field by 1, basically leaving it a positive value.
if you place this formula field on your report design it would like this
Account Amount Flag Formula
020 1000 Null 1000
050 50 D 50
050 60 I -60
Now if you do a SUM of that field it will add your records to together which gives you the value you want (adding a negative value is the same as subtracting).
you proabably need to alter this to handle NULLS in your records set to look like this
{table.amount} * (if isnull({table.flag}) or {table.flag} <> "I" then 1 else -1)
to insert a SUM click on the sigma sign, select the field you want to sum (the formula field you just made) set the calculation to SUM and the location to grand total (assuming you are not grouping).
it will look like this
Edited by DBlank - 06 Jul 2011 at 3:38am