Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trial Balance urgent help needed
Message
From
28/05/2002 13:09:17
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
28/05/2002 13:00:47
Hisham Serry
Al-Bahar United Company
Kuwait, Kuwait
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00662077
Message ID:
00662080
Views:
27
>Hi All,
>
>I have a small problem with a trial balance report, I have 2 sides debit and credit for each account and I do group them in the report and sum the debit side and credit side also I need to put in a variable of the debit blance the deff. between debit-credit which is greater than 0 and in the credit balance the values less than 0 then in the group footer I need sum each one of them to get the totals, I'm trying to use the report variables one of them with condition of IIF(debit-credit>0,balancedebit,0) and the other IIF(debit-credit<0,balancecredit,0) then I need to sum them in the end of the report by normal sum in the field, I tried but no success, any idea about this subject in reports ???? urgent help needed

While you may do for a while with report variables, it would be far easier for various manipulation purposes to do some SQL and add a couple of columns to your cursor, as in
select ... ;
   IIF(debit-credit>0,debit-credit,0) as balancedebit,;
   IIF(credit-debit>0,credit-debit,0) as balanccredit;
   ...
so while reporting you don't have to repeat all these iif()s every now and then. It's also easier to total cursor fields than report variables. While reports can do a lot of data manipulation, it's still faster, cleaner and more elegant (read as "easier to maintain") if you do this sort of thing in code than when you do it in a report.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform