Well cathy, thanks for fast replay the problem I want to get the deffrent between the debit and credit side and if the deffrent is more than 0 it should save it in variable called debitbalance and if it less than 0 it should save it in variable called creditbalance and I was using IIF() but it is not working good, so I feel there is something which is missing for example
you have a table with 2 fields one is debit and the other is credit
when you you want to get the balance for both of them I need to say
debit-credit=value
if value>0 then debitbalance=value else creditvalue=value endif
so in the report you can't write such thing so I have to use IIF(debit-credit>0,debit-credit,0) and IIF(credit-debit>0,credit-debit,0)
shall I use the result of IIF() in anther report variable. ??
I tried but not successing. I need help in this if you need more infromation I can send you the tables and the sql statement that I done.
Best Regards,
Hisham Serry
IT Management